Chris Lattner
0fb5bbd401
do not store wchar/char16/char32/intmax width/alignment info
...
into TargetInfo, just derive this based on the underlying type.
This prevents them from getting out of synch, patch by Ken Dyck!
llvm-svn: 86976
2009-11-12 08:04:33 +00:00
Chris Lattner
eb9acbfb05
implement a nice little efficiency hack in the inliner. Since we're now
...
running IPSCCP early, and we run functionattrs interlaced with the inliner,
we often (particularly for small or noop functions) completely propagate
all of the information about a call to its call site in IPSSCP (making a call
dead) and functionattrs is smart enough to realize that the function is
readonly (because it is interlaced with inliner).
To improve compile time and make the inliner threshold more accurate, realize
that we don't have to inline dead readonly function calls. Instead, just
delete the call. This happens all the time for C++ codes, here are some
counters from opt/llvm-ld counting the number of times calls were deleted vs
inlined on various apps:
Tramp3d opt:
5033 inline - Number of call sites deleted, not inlined
24596 inline - Number of functions inlined
llvm-ld:
667 inline - Number of functions deleted because all callers found
699 inline - Number of functions inlined
483.xalancbmk opt:
8096 inline - Number of call sites deleted, not inlined
62528 inline - Number of functions inlined
llvm-ld:
217 inline - Number of allocas merged together
2158 inline - Number of functions inlined
471.omnetpp:
331 inline - Number of call sites deleted, not inlined
8981 inline - Number of functions inlined
llvm-ld:
171 inline - Number of functions deleted because all callers found
629 inline - Number of functions inlined
Deleting a call is much faster than inlining it, and is insensitive to the
size of the callee. :)
llvm-svn: 86975
2009-11-12 07:56:08 +00:00
Evan Cheng
5d85a46f76
RegScavenger::enterBasicBlock should always reset register state.
...
llvm-svn: 86972
2009-11-12 07:49:10 +00:00
Evan Cheng
85a9f430e9
- Teach LSR to avoid changing cmp iv stride if it will create an immediate that
...
cannot be folded into target cmp instruction.
- Avoid a phase ordering issue where early cmp optimization would prevent the
later count-to-zero optimization.
- Add missing checks which could cause LSR to reuse stride that does not have
users.
- Fix a bug in count-to-zero optimization code which failed to find the pre-inc
iv's phi node.
- Remove, tighten, loosen some incorrect checks disable valid transformations.
- Quite a bit of code clean up.
llvm-svn: 86969
2009-11-12 07:35:05 +00:00
Daniel Dunbar
4c0e8274e9
Move warning options into DiagnosticOptions.
...
llvm-svn: 86968
2009-11-12 07:28:44 +00:00
Daniel Dunbar
71ed08ba39
Avoid comparing string literals.
...
llvm-svn: 86967
2009-11-12 07:28:29 +00:00
Daniel Dunbar
8fd69a09cc
Move dump-build-information option into DiagnosticOptions.
...
llvm-svn: 86966
2009-11-12 07:28:21 +00:00
Evan Cheng
e129dd311e
Use table to separate opcode from operands.
...
llvm-svn: 86965
2009-11-12 07:16:34 +00:00
Evan Cheng
15b80e4a9f
isLegalICmpImmediate should take a signed integer; code clean up.
...
llvm-svn: 86964
2009-11-12 07:13:11 +00:00
Daniel Dunbar
ec256a921f
clang-cc: Factor CreateDiagnosticEngine out of main.
...
llvm-svn: 86963
2009-11-12 06:48:31 +00:00
Daniel Dunbar
0d1defd4cd
clang-cc: -fixit is actually option, not an action, although its use with non
...
-fsyntax-only is probably untested.
llvm-svn: 86962
2009-11-12 06:48:24 +00:00
Daniel Dunbar
723e74ab75
Simplify.
...
llvm-svn: 86961
2009-11-12 06:48:17 +00:00
Oscar Fuentes
700205c49f
CMake: Hopefully unbreak the build by mimicking the changes on the
...
other build system about the new C_INCLUDE_DIRS configure option.
llvm-svn: 86960
2009-11-12 06:48:09 +00:00
Ted Kremenek
6c37c5c356
PthreadLockChecker doesn't need PreVisitCallExpr() yet. All the current logic should be done in PostVisitCallExpr()
...
llvm-svn: 86959
2009-11-12 06:26:58 +00:00
Ted Kremenek
d48568f641
Add most of the boilerplate logic for a simple pthread_mutux_lock() -> pthread_mutex_unlock() checker. We need to add a visitor method to Checker for handling dead symbols in order to detect locks that are not unlocked.
...
llvm-svn: 86958
2009-11-12 06:17:47 +00:00
Ted Kremenek
386a2a52d3
Remove obsolete 'struct NullDerefTag'.
...
llvm-svn: 86957
2009-11-12 06:16:18 +00:00
Rafael Espindola
f401fa0386
Use the --with-c-include-dirs configure option.
...
llvm-svn: 86956
2009-11-12 05:48:41 +00:00
Rafael Espindola
d95960be25
Add the --with-c-include-dirs to llvm's configure.
...
The clang patch is next.
llvm-svn: 86955
2009-11-12 05:46:09 +00:00
Oscar Fuentes
d533e1d46b
CMake: Pass -lm to check_symbol_exists for detecting several math
...
functions like floorf, ceilf, ... Add test for detecting nearbyintf.
This change was prompted by test/Transforms/SimplifyLibCalls/floor.ll
llvm-svn: 86954
2009-11-12 05:36:09 +00:00
Chris Lattner
5f6b8b2bcb
use getPredicateOnEdge to fold comparisons through PHI nodes,
...
which implements GCC PR18046. This also gets us 360 more
jump threads on 176.gcc.
llvm-svn: 86953
2009-11-12 05:24:05 +00:00
Chris Lattner
22db4b5e0c
various fixes to the lattice transfer functions.
...
llvm-svn: 86952
2009-11-12 04:57:13 +00:00
Chris Lattner
c893c4ed10
switch jump threading to use getPredicateOnEdge in one place
...
making the new LVI stuff smart enough to subsume some special
cases in the old code. Disable them when LVI is around, the
testcase still passes.
llvm-svn: 86951
2009-11-12 04:37:50 +00:00
Chris Lattner
565ee2f1bd
Add a new getPredicateOnEdge method which returns more rich information for
...
constant constraints. Improve the LVI lattice to include inequality
constraints.
llvm-svn: 86950
2009-11-12 04:36:58 +00:00
Ted Kremenek
a971afb90f
Enhance Checker class (and GRExprEngine) to support PostVisitation for CallExprs. No clients (yet).
...
llvm-svn: 86949
2009-11-12 04:35:08 +00:00
Ted Kremenek
8f6c4e8617
Remove GRExprEngine::EvalCall(). It had a single callsite in GRExprEngine, and was easily inlined.
...
llvm-svn: 86948
2009-11-12 04:16:35 +00:00
Jim Grosbach
801b33b17c
Move the utility function UpdateTerminator() from CodePlacementOpt() into
...
MachineBasicBlock so other passes can utilize it.
llvm-svn: 86947
2009-11-12 03:55:33 +00:00
Jim Grosbach
6385ea7c4e
Revert 86857. It's causing consumer-typeset to fail, and there's a better way to do it forthcoming anyway.
...
llvm-svn: 86945
2009-11-12 03:28:35 +00:00
John McCall
84c16cf824
Random const correctness, and incidentally use computeDeclContext when building
...
a using declaration.
llvm-svn: 86942
2009-11-12 03:15:40 +00:00
Eric Christopher
cb5e227373
Use stubs when we have them, otherwise use code we already have,
...
otherwise create a stub.
Add a test to make sure we don't create extraneous stubs.
llvm-svn: 86941
2009-11-12 03:12:18 +00:00
Daniel Dunbar
2940303363
Move TokenCache option to PreprocessorOptions.
...
llvm-svn: 86940
2009-11-12 02:53:59 +00:00
Daniel Dunbar
1a54e3fbb9
Switch PTHManager to using diagnostics for most errors.
...
Also, always give errors on a token-cache PTH failure.
llvm-svn: 86939
2009-11-12 02:53:48 +00:00
Daniel Dunbar
51637a9ba4
Simplify.
...
llvm-svn: 86938
2009-11-12 02:53:34 +00:00
Daniel Dunbar
1619831fde
clang-cc: Refactor ParseInputFollow to clearly split on the two primary cases,
...
when we are running an AST consumer and when we are just running the
preprocessor or parser alone.
llvm-svn: 86937
2009-11-12 02:53:27 +00:00
Daniel Dunbar
4806f2ea48
clang-cc: Factor ReadPCHFile out of ProcessInputFile.
...
llvm-svn: 86936
2009-11-12 02:53:20 +00:00
Daniel Dunbar
92641dca86
Simplify.
...
llvm-svn: 86935
2009-11-12 02:53:13 +00:00
Daniel Dunbar
7336edd8b2
clang-cc: Unify InitializeSourceManager calls.
...
llvm-svn: 86934
2009-11-12 02:53:06 +00:00
Daniel Dunbar
11881e2283
Add the braces gcc suggested.
...
llvm-svn: 86933
2009-11-12 02:52:56 +00:00
Zhongxing Xu
383c273966
Make StoreManager::getSizeInElements() always return DefinedOrUnknownSVal.
...
llvm-svn: 86932
2009-11-12 02:48:32 +00:00
John McCall
495922cb6a
Note to self: don't leave debugging statements in the code for four hours.
...
llvm-svn: 86931
2009-11-12 02:10:34 +00:00
Nick Lewycky
9f3e73b0f6
Add CreateNUWAdd and CreateNUWSub to complement the existing CreateNSWAdd and
...
CreateNSWSub functions.
llvm-svn: 86930
2009-11-12 02:08:11 +00:00
Chris Lattner
380ccbaeaa
should not commit when distracted.
...
llvm-svn: 86929
2009-11-12 02:04:17 +00:00
Dan Gohman
a9b40a6eb4
Make the BranchFolderPass class local to BranchFolding.cpp.
...
llvm-svn: 86928
2009-11-12 01:59:26 +00:00
Chris Lattner
e2a63f2798
We now thread some impossible condition information with LVI.
...
llvm-svn: 86927
2009-11-12 01:55:20 +00:00
Dan Gohman
b3bf49f67e
Minor code cleanups.
...
llvm-svn: 86926
2009-11-12 01:51:28 +00:00
Chris Lattner
ba45616958
with the new code we can thread non-instruction values. This
...
allows us to handle the test10 testcase.
llvm-svn: 86924
2009-11-12 01:41:34 +00:00
Chris Lattner
3f80d85191
this argument can be an arbitrary value, it doesn't need to be an instruction.
...
llvm-svn: 86923
2009-11-12 01:37:43 +00:00
Daniel Dunbar
f7316732b8
clang-cc: Move non-Consumer action handling to common location, to expose the massive amount of redundancy we have introduced through blind copy-and-paste.
...
llvm-svn: 86922
2009-11-12 01:36:27 +00:00
Daniel Dunbar
f4408a29e1
Fix PCH/preprocess test to be more useful, and unbreak -E mode with implicit
...
PCH, which I broke.
llvm-svn: 86921
2009-11-12 01:36:20 +00:00
Chris Lattner
d5e25436a1
expose edge information and switch j-t to use it.
...
llvm-svn: 86920
2009-11-12 01:29:10 +00:00
Lang Hames
bff25cb044
Fixed an iteration condition in PreAllocSplitting. This should fix some miscompilations casued by PreAllocSplitting.
...
llvm-svn: 86919
2009-11-12 01:24:08 +00:00