Daniel Dunbar
75b4d3562c
Fix -Asserts warning.
...
llvm-svn: 86794
2009-11-11 03:09:50 +00:00
Mike Stump
c7b9f5e762
More VTT work. We now track offsets and use the ctor vtable builder
...
interface. WIP.
llvm-svn: 86793
2009-11-11 03:08:24 +00:00
Mike Stump
4e16d05dc4
Fixup spacing.
...
llvm-svn: 86792
2009-11-11 02:49:00 +00:00
Jim Grosbach
8d92ec45c7
The TBB and TBH instructions for Thumb2 are really handy for jump tables, but
...
can only branch forward. To best take advantage of them, we'd like to adjust
the basic blocks around a bit when reasonable. This patch puts basics in place
to do that, with a super-simple algorithm for backwards jump table targets that
creates a new branch after the jump table which branches backwards. Real
heuristics for reordering blocks or other modifications rather than inserting
branches will follow.
llvm-svn: 86791
2009-11-11 02:47:19 +00:00
John McCall
0506e4af2c
Apparently the following idiom is specifically encouraged:
...
if (self = [super init])
Recognize it and only warn if -Wparentheses is explicitly enabled.
llvm-svn: 86790
2009-11-11 02:41:58 +00:00
Chris Lattner
fde1f8d0d8
stub out some LazyValueInfo interfaces, and have JumpThreading
...
start using them in a trivial way when -enable-jump-threading-lvi
is passed. enable-jump-threading-lvi will be my playground for
awhile.
llvm-svn: 86789
2009-11-11 02:08:33 +00:00
Bill Wendling
d656f8ec4c
Fix test to work on every platform.
...
llvm-svn: 86786
2009-11-11 01:44:22 +00:00
Bill Wendling
5831283cb5
Fix test to work on every platform.
...
llvm-svn: 86785
2009-11-11 01:41:32 +00:00
Devang Patel
b90dac093a
XFAIL for now.
...
llvm-svn: 86784
2009-11-11 01:41:10 +00:00
Bill Wendling
676f44062e
Make sure that the exception handling data has the same visibility as the
...
function it's generated for.
llvm-svn: 86779
2009-11-11 01:24:59 +00:00
Fariborz Jahanian
e6c8112572
Avoid generating additional destructor(s) for initialized constructed
...
objects.
llvm-svn: 86778
2009-11-11 01:13:34 +00:00
Douglas Gregor
9167f8bbd5
Introduce a new representation for template template
...
parameters. Rather than storing them as either declarations (for the
non-dependent case) or expressions (for the dependent case), we now
(always) store them as TemplateNames.
The primary change here is to add a new kind of TemplateArgument,
which stores a TemplateName. However, making that change ripples to
every switch on a TemplateArgument's kind, also affecting
TemplateArgumentLocInfo/TemplateArgumentLoc, default template
arguments for template template parameters, type-checking of template
template arguments, etc.
This change is light on testing. It should fix several pre-existing
problems with template template parameters, such as:
- the inability to use dependent template names as template template
arguments
- template template parameter default arguments cannot be
instantiation
However, there are enough pieces missing that more implementation is
required before we can adequately test template template parameters.
llvm-svn: 86777
2009-11-11 01:00:40 +00:00
Daniel Dunbar
3618834da8
Recognize -fsyntax-only as a "consumer only" action.
...
llvm-svn: 86776
2009-11-11 00:54:56 +00:00
Daniel Dunbar
20a682de6b
StringRefify some PCH interfaces.
...
llvm-svn: 86775
2009-11-11 00:52:11 +00:00
Daniel Dunbar
045c92f812
Replace startsWith functions with StringRef.
...
llvm-svn: 86774
2009-11-11 00:52:00 +00:00
Daniel Dunbar
9169a37daf
Add Triple::str() which returns the contents of the Triple as a string, as a more readable alternative to getTriple().
...
llvm-svn: 86773
2009-11-11 00:43:14 +00:00
Mike Stump
8b2d2d0707
Stub out most of the VTT building code. WIP.
...
llvm-svn: 86772
2009-11-11 00:35:07 +00:00
Devang Patel
78319c67ca
Do not assume first function scope seen represents current function.
...
llvm-svn: 86771
2009-11-11 00:31:36 +00:00
Daniel Dunbar
9806e4ab20
Add From arguments to StringRef search functions, and tweak doxyments.
...
Also, add unittests for find_first_of and find_first_not_of.
llvm-svn: 86770
2009-11-11 00:28:53 +00:00
Daniel Dunbar
bc299f0092
llvm-gcc/clang don't (won't?) need this hack.
...
llvm-svn: 86769
2009-11-11 00:28:38 +00:00
Chris Lattner
6e960c8657
oops, didn't mean to commit this, no harm, but add a todoops, didn't mean to commit this, no harm, but add a todoo
...
llvm-svn: 86768
2009-11-11 00:27:54 +00:00
Chris Lattner
741c94c719
Stub out a new lazy value info pass, which will eventually
...
vend value constraint information to the optimizer.
llvm-svn: 86767
2009-11-11 00:22:30 +00:00
Chris Lattner
3a2ae908fe
add a fixme
...
llvm-svn: 86766
2009-11-11 00:21:58 +00:00
Chris Lattner
c4e03b7ac7
remove redundant foward declaration. This function is already in
...
Analysis/Passes.h
llvm-svn: 86765
2009-11-11 00:21:21 +00:00
John McCall
caef2448da
Create a new Scope when parsing a declaration with a C++ scope specifier.
...
llvm-svn: 86764
2009-11-11 00:21:18 +00:00
Devang Patel
4450f26621
While creating DbgScopes, do not forget parent scope.
...
llvm-svn: 86763
2009-11-11 00:18:40 +00:00
Evan Cheng
12f146d8f7
Block terminator may be a switch.
...
llvm-svn: 86761
2009-11-11 00:00:21 +00:00
Daniel Dunbar
93097b3906
Add Diagnostic::Report method for reporting diagnostics without a location.
...
llvm-svn: 86760
2009-11-10 23:55:23 +00:00
Chris Lattner
3835610902
jump threading does everything that condprop does any more. This passes
...
bootstrap on darwin i386.
llvm-svn: 86758
2009-11-10 23:54:10 +00:00
Daniel Dunbar
de02f63945
PreprocessorOptions: Get rid of unnecessary 'isPTH' flag for include entries.
...
llvm-svn: 86757
2009-11-10 23:53:43 +00:00
Chris Lattner
0169fd7c62
add a note
...
llvm-svn: 86756
2009-11-10 23:47:45 +00:00
Fariborz Jahanian
4e088941ad
Diagnose illegally typed operator new/new[].
...
llvm-svn: 86755
2009-11-10 23:47:18 +00:00
Chris Lattner
8ff26038ef
I did this a week or two ago
...
llvm-svn: 86754
2009-11-10 23:40:49 +00:00
Devang Patel
cdb7d44d6d
Ignore variable if scope info is not available.
...
llvm-svn: 86753
2009-11-10 23:20:04 +00:00
Bill Wendling
47739b20fd
Test this on Darwin only.
...
llvm-svn: 86752
2009-11-10 23:18:33 +00:00
Dale Johannesen
6f7d5b22bb
Emit correct code when making a ConstantPool entry for a vector
...
constant whose component type is not a legal type for the target.
(If the target ConstantPool cannot handle this type either, it has
an opportunity to merge elements. In practice any target with
8-bit bytes must support i8 *as data*). 7320806 (partial).
llvm-svn: 86751
2009-11-10 23:16:41 +00:00
Devang Patel
af993bf5cc
Attach location info with llvm.dbg.declare.
...
llvm-svn: 86750
2009-11-10 23:07:24 +00:00
Devang Patel
f6eeaebd76
Implement support to debug inlined functions.
...
llvm-svn: 86748
2009-11-10 23:06:00 +00:00
Chris Lattner
a5056f5b2b
in -dot-cfg and -dot-cfg-only, when rendering switch instructions,
...
put the switch value in the successor boxes like we put T/F for branches.
llvm-svn: 86747
2009-11-10 22:56:15 +00:00
Ted Kremenek
0b61a805b9
Add FIXIT hint for -Wsemicolon-before-method-body
...
llvm-svn: 86746
2009-11-10 22:55:49 +00:00
Eli Friedman
d76f438369
Revert r86741; it doesn't handle virtual bases correctly.
...
llvm-svn: 86745
2009-11-10 22:48:10 +00:00
Eli Friedman
0960059c0c
Minor optimization to skip null check in generated code where it isn't
...
necessary.
llvm-svn: 86741
2009-11-10 22:42:26 +00:00
Chris Lattner
9518fbb54e
implement a TODO by teaching jump threading about "xor x, 1".
...
llvm-svn: 86739
2009-11-10 22:39:16 +00:00
Eli Friedman
3ad2645430
Fix for PR5454: make sure to use the right block as the predecessor in the
...
generated PHI node for the null check of a new operator.
llvm-svn: 86738
2009-11-10 22:39:09 +00:00
Chris Lattner
852d6d64ff
move some generally useful functions out of jump threading
...
into libanalysis and transformutils.
llvm-svn: 86735
2009-11-10 22:26:15 +00:00
Ted Kremenek
42855f2043
Shuffle order of warning declarations (alphabetize).
...
llvm-svn: 86733
2009-11-10 22:22:50 +00:00
Dan Gohman
de8d418ac3
Don't mark conditional branch instructions as control barriers.
...
llvm-svn: 86732
2009-11-10 22:16:57 +00:00
Ted Kremenek
f9a28abe8d
Make -Wsemicolon-before-method-body opt-in (and part of -Wextra). Addresses <rdar://problem/7381735>.
...
llvm-svn: 86731
2009-11-10 22:16:29 +00:00
Bill Wendling
fc9469f311
Modify how the prologue encoded the "move" information for the FDE. GCC
...
generates a sequence similar to this:
__Z4funci:
LFB2:
mflr r0
LCFI0:
stmw r30,-8(r1)
LCFI1:
stw r0,8(r1)
LCFI2:
stwu r1,-80(r1)
LCFI3:
mr r30,r1
LCFI4:
where LCFI3 and LCFI4 are used by the FDE to indicate what the FP, LR, and other
things are. We generated something more like this:
Leh_func_begin1:
mflr r0
stw r31, 20(r1)
stw r0, 8(r1)
Llabel1:
stwu r1, -80(r1)
Llabel2:
mr r31, r1
Note that we are missing the "mr" instruction. This patch makes it more like the
GCC output.
llvm-svn: 86729
2009-11-10 22:14:04 +00:00
Daniel Dunbar
47ea8628a5
Decouple more of clang-cc by moving ImplicitP[CT]H options into
...
PreprocessorOptions.
Global variables used as [in] [out] parameters considered harmful.
llvm-svn: 86728
2009-11-10 22:09:38 +00:00