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
Chris Lattner
b584d1e456
move some stuff into DEBUG's and turn on lazy-value-info for
...
the basic.ll testcase.
llvm-svn: 86918
2009-11-12 01:22:16 +00:00
Eric Christopher
ebbfbeef7d
Fix typo, cleanup whitespace.
...
llvm-svn: 86917
2009-11-12 01:06:08 +00:00
Devang Patel
7bdf096f8d
Do not use StringRef while using DebugInfo interface.
...
llvm-svn: 86915
2009-11-12 00:51:46 +00:00
Devang Patel
862ef782de
Do not use StringRef in DebugInfo interface.
...
This allows StringRef to skip controversial if(str) check in constructor.
Buildbots, wait for corresponding clang and llvm-gcc FE check-ins!
llvm-svn: 86914
2009-11-12 00:50:58 +00:00
Douglas Gregor
dd6c0356ba
Improve recovery in a wonky case where one tries to specialize a
...
template template parameter.
When building a template-id type, check whether the template-name
itself is dependent (even if the template arguments are not!) and
handle it as a template-id type.
llvm-svn: 86913
2009-11-12 00:46:20 +00:00
Daniel Dunbar
0cfa3c4875
Fix Makefile dependency bug with out-of-dir builds.
...
llvm-svn: 86912
2009-11-12 00:41:49 +00:00
Daniel Dunbar
d8ff51bf49
Fix test portability.
...
llvm-svn: 86911
2009-11-12 00:41:41 +00:00
Dan Gohman
09478e975d
Tail merge at any size when there are two potentials blocks and one
...
can be made to fall through into the other.
llvm-svn: 86909
2009-11-12 00:39:10 +00:00
Daniel Dunbar
a970d39ebf
Tweak AnalyzerOptions for consistency, and make sure default constructed object
...
is sane.
llvm-svn: 86908
2009-11-12 00:24:35 +00:00
Daniel Dunbar
39b6e2a0fd
Tweak formatting.
...
llvm-svn: 86907
2009-11-12 00:24:28 +00:00
Daniel Dunbar
e6de40e747
Move AnalyzerOptions into CompilerInvocation.
...
llvm-svn: 86906
2009-11-12 00:24:10 +00:00
John McCall
b0e419e34d
Add <foo> = [<bar> nextObject] to the -Widiomatic-parentheses category,
...
and give that category an explicit test. Generalize the internal diagnostic
name.
llvm-svn: 86905
2009-11-12 00:06:05 +00:00
Douglas Gregor
c998409cce
Remove an overly-eager assertion when replacing tokens with an
...
annotation token, because some of the tokens we're annotating might
not be in the set of cached tokens (we could have consumed them
unconditionally).
Also, move the tentative parsing from ParseTemplateTemplateArgument
into the one caller that needs it, improving recovery.
llvm-svn: 86904
2009-11-12 00:03:40 +00:00
Daniel Dunbar
732ef8aefd
Tweak PCH -include handling to make sure it matches the name as would be present
...
in the predefines buffer.
llvm-svn: 86903
2009-11-11 23:58:53 +00:00
Bill Wendling
7a6b11e707
Don't mark a call as potentially throwing if the function it's calling has the
...
"nounwind" attribute.
llvm-svn: 86897
2009-11-11 23:17:02 +00:00
John Thompson
92ebab90fe
Fix clang executable path for Windows
...
llvm-svn: 86896
2009-11-11 23:11:14 +00:00
Bruno Cardoso Lopes
626d49f684
A real solution for the first part of PR5445
...
llvm-svn: 86895
2009-11-11 23:09:33 +00:00
Douglas Gregor
adee3e3b22
Template argument deduction for template template parameters. This
...
permits, among other things, ripping apart and reconstructing
templates via partial specialization:
template<typename T>
struct DeepRemoveConst { typedef T type; };
template<typename T>
struct DeepRemoveConst<const T> {
typedef typename DeepRemoveConst<T>::type type;
};
template<template<typename> class TT, typename T>
struct DeepRemoveConst<TT<T> > {
typedef TT<typename DeepRemoveConst<T>::type> type;
};
Also, fix a longstanding thinko in the code handling partial ordering
of class template partial specializations. We were performing the
second deduction without clearing out the results of the first
deduction. It's amazing we got through so much code with such a
horrendous error :(
llvm-svn: 86893
2009-11-11 23:06:43 +00:00
John McCall
5055e4cdfd
Fix PR 5422: handle lvalue results when evaluating 'based' ptrtoints as part of
...
the -Wconversion check.
llvm-svn: 86891
2009-11-11 22:52:37 +00:00