Nick Lewycky
47b92a2cc4
Add a 'Base' type to RecursiveASTVisitor to make recursing easier and document
...
how you're supposed to use it.
llvm-svn: 103993
2010-05-17 23:15:38 +00:00
Bill Wendling
02d3368831
- Set the "HasCalls" flag after instruction selection is finished.
...
- Change the logic DisableFramePointerElim() to check for the
-disable-non-leaf-fp-elim before -disable-fp-elim.
llvm-svn: 103990
2010-05-17 23:09:50 +00:00
Kevin Enderby
0510b48fd9
Added support in MC for Directional Local Labels.
...
llvm-svn: 103989
2010-05-17 23:08:19 +00:00
Ted Kremenek
990783e345
Clean up test case and remove XFAIL. This test can now distinguish between
...
cases where Clang can suggest and fix and suggest and not auto-fix (because of
current limitations).
llvm-svn: 103987
2010-05-17 23:03:33 +00:00
John McCall
1b84d1106e
Comments and assorted cleanups for the Objective C type AST.
...
llvm-svn: 103986
2010-05-17 23:00:45 +00:00
Eric Christopher
9635b3da6b
More data/parsing support for tls directives. Add a few more testcases
...
and cleanup comments as well.
llvm-svn: 103985
2010-05-17 22:53:55 +00:00
Evan Cheng
f2c9a96f3c
Fix PR7156. If the sources of a REG_SEQUENCE are all IMPLICIT_DEF's. Replace it with an IMPLICIT_DEF rather than deleting it or else it would be left without a def.
...
llvm-svn: 103984
2010-05-17 22:09:49 +00:00
Howard Hinnant
6692b261d8
[rand.dist.norm.cauchy]. I'm having trouble testing the output as all statistical properties are undefined. They do not converge upon any one value as the number of samples increases. Suggestions for tests welcome.
...
llvm-svn: 103983
2010-05-17 21:55:46 +00:00
Evan Cheng
cd04ed3533
vmov of immediates are trivially re-materializable.
...
llvm-svn: 103982
2010-05-17 21:54:50 +00:00
Daniel Dunbar
bb166bed40
MC/Mach-O/x86: Optimal nop sequences should only be used for the .text sections, not all sections in the text segment.
...
llvm-svn: 103981
2010-05-17 21:54:30 +00:00
Daniel Dunbar
ce5e1bb326
MC: Add dyn_cast support to MCSection.
...
- Of questionable utility, since in general anything which wants to do this should probably be within a target specific hook, which can rely on the sections being of the appropriate type. However, it can be useful for short term hacks.
llvm-svn: 103980
2010-05-17 21:54:26 +00:00
Daniel Dunbar
b7b796cc11
MC/Mach-O: Reverse order of SymbolData scanning when emitting instructions.
...
- This fixes a string table mismatch with 'as' when two new symbols are defined
in a single instruction.
llvm-svn: 103979
2010-05-17 21:19:59 +00:00
Jakob Stoklund Olesen
585792738b
Pull the UsedInInstr.test() calls into calcSpillCost() and remember aliases.
...
This fixes the miscompilations of MultiSource/Applications/JM/l{en,de}cod.
Clang now successfully self hosts in a debug build with the fast register allocator.
llvm-svn: 103975
2010-05-17 21:02:08 +00:00
Eric Christopher
bf79238599
Add some section and constant support for darwin TLS.
...
llvm-svn: 103974
2010-05-17 21:02:07 +00:00
John McCall
96fa4845f7
Clean up some more uses of getAs<ObjCInterfaceType>() that Fariborz pointed
...
out. The remaining ones are okay.
llvm-svn: 103973
2010-05-17 21:00:27 +00:00
Chandler Carruth
0450cc684c
Fix an ambiguous else warning from GCC by adding some much needed curlies.
...
llvm-svn: 103972
2010-05-17 20:58:49 +00:00
Evan Cheng
29c463862e
Careful with reg_sequence coalescing to not to overwrite sub-register indices.
...
llvm-svn: 103971
2010-05-17 20:57:12 +00:00
Howard Hinnant
eb6fa6af2b
Got rid of more :: path names
...
llvm-svn: 103970
2010-05-17 20:38:02 +00:00
Bob Wilson
c601801a7e
Fix a regression in 464.h264 for thumb1 and thumb2 nightly tests.
...
Obvious in retrospect but not fun to debug.
llvm-svn: 103969
2010-05-17 20:31:13 +00:00
Chris Lattner
467f6bcfe5
robustify the conflict marker stuff. Don't add 7 twice, which would
...
make it miss (invalid) things like:
<<<<<<<
>>>>>>>
and crash if
<<<<<<<
was at the end of the line. When we find a >>>>>>> that is not at the
end of the line, make sure to reset Pos so we don't crash on something
like:
<<<<<<< >>>>>>>
This isn't worth making testcases for, since each would require a new file.
rdar://7987078 - signal 11 compiling "<<<<<<<<<<"
llvm-svn: 103968
2010-05-17 20:27:25 +00:00
Ted Kremenek
0ed7549343
Fix missing '}'.
...
llvm-svn: 103966
2010-05-17 20:12:45 +00:00
John McCall
3e294929b8
Correctly generate IR for ObjC messages sends to protocol-qualified types.
...
Fixes rdar://problem/7992749
llvm-svn: 103965
2010-05-17 20:12:43 +00:00
Daniel Dunbar
0211a96989
MC/Mach-O: Fix some differences in symbol flag handling.
...
- Don't clear weak reference flag, 'as' was only "trying" to do this, it wasn't
actually succeeding.
- Clear the "lazy bound" bit when we mark something external. This corresponds
roughly to the lazy clearing of the bit that 'as' implements in
symbol_table_lookup.
- The exact meaning of these flags appears pretty loose, since 'as' isn't very
consistent. For now we just try to match 'as', we will clean this up one day
hopefully.
llvm-svn: 103964
2010-05-17 20:12:31 +00:00
Ted Kremenek
9cfe9e6a4a
Add libclang function 'clang_CXXMethod_isStatic' to query of a C++ method
...
is declared static.
llvm-svn: 103963
2010-05-17 20:06:56 +00:00
Jakob Stoklund Olesen
84a8415ed7
Optimize empty DenseMap iteration.
...
llvm-svn: 103962
2010-05-17 20:01:24 +00:00
Jakob Stoklund Olesen
70563bbba5
Remove debug option. Add comment on spill order determinism.
...
llvm-svn: 103961
2010-05-17 20:01:22 +00:00
Evan Cheng
3d98b996ff
Turn on -neon-reg-sequence by default.
...
Using NEON load / store multiple instructions will no longer create gobs of vmov of D registers!
llvm-svn: 103960
2010-05-17 19:51:20 +00:00
Douglas Gregor
c4c574bd2e
Test that mutability of class members that involve class definitions actually works
...
llvm-svn: 103959
2010-05-17 19:45:25 +00:00
Douglas Gregor
3b05bdba5a
Teach ASTContext::getUnqualifiedArrayType() how to look through
...
typedefs. As a drive-by, teach hit how to build VLA types, since those
will eventually be supported in C++.
llvm-svn: 103958
2010-05-17 18:45:21 +00:00
Howard Hinnant
fd5c3a34e3
[rand.dist.norm.lognormal]
...
llvm-svn: 103957
2010-05-17 18:31:53 +00:00
Douglas Gregor
c9a99c5e5c
mutable is a storage class that can follow a class/struct/union definition. Fixes PR7153
...
llvm-svn: 103954
2010-05-17 18:19:56 +00:00
Fariborz Jahanian
16f94c6e8f
Don't attempt to poke into an invalid field's class type
...
to mark its destructors as referenced which may cause
a crash. Fixes radar 7896920
llvm-svn: 103953
2010-05-17 18:15:18 +00:00
Douglas Gregor
fd7224fee0
Diagnose a redefinition error when there are two instantiations of friend
...
functions defined inside a class template. Fixes PR6952, the last
Boost.Units failure.
llvm-svn: 103952
2010-05-17 17:57:54 +00:00
Daniel Dunbar
9b4a824217
llvm-mc: Support reassignment of variables in one special case, when the
...
variable has not yet been used in an expression. This allows us to support a few
cases that show up in real code (mostly because gcc generates it for Objective-C
on Darwin), without giving up a reasonable semantic model for assignment.
llvm-svn: 103950
2010-05-17 17:46:23 +00:00
Douglas Gregor
69f6a365d3
Determine when the instantiation of a friend function defined inside a
...
class template conflicts with an existing (non-template)
definition. This is another part of PR6952.
llvm-svn: 103948
2010-05-17 17:34:56 +00:00
Jakob Stoklund Olesen
176a9c4272
Avoid allocating the same physreg to multiple virtregs in one instruction.
...
While that approach works wonders for register pressure, it tends to break
everything.
This should unbreak the arm-linux builder and fix a number of miscompilations.
llvm-svn: 103946
2010-05-17 17:18:59 +00:00
Daniel Dunbar
f7a8825484
IRgen: Remove dead function.
...
llvm-svn: 103945
2010-05-17 16:46:02 +00:00
Daniel Dunbar
cd20ce1513
C++/Darwin/i386 ABI: Fix some problems with empty record handling.
...
- Check bases as part of isEmptyRecord().
- C++ record fields are never empty in the Itanium ABI.
llvm-svn: 103944
2010-05-17 16:46:00 +00:00
Douglas Gregor
1cd6ea0b24
C++98/03 [temp.friend]p4 requires that inline function definitions
...
within class templates be instantiated along with each class template
specialization, even if the functions are not used. Do so, as a baby
step toward PR6952.
llvm-svn: 103943
2010-05-17 16:38:00 +00:00
Howard Hinnant
c675d983f6
[rand.dist.pois.extreme]
...
llvm-svn: 103942
2010-05-17 16:21:56 +00:00
Douglas Gregor
9154b5dffe
Ensure that destructors are called for NRVO'd objects when the
...
function does not return. Thanks to Eli for pointing out this corner
case.
llvm-svn: 103941
2010-05-17 15:52:46 +00:00
Jakob Stoklund Olesen
f5e8c86424
Minor optimizations. DenseMap::begin() is surprisingly slow on an empty map.
...
llvm-svn: 103940
2010-05-17 15:30:37 +00:00
Jakob Stoklund Olesen
6649cdaa23
Extract spill cost calculation to a new method, and use definePhysReg() to clear
...
out aliases when allocating. Clean up allocVirtReg().
Use calcSpillCost() to allow more aggressive hinting. Now the hint is always
taken unless blocked by a reserved register. This leads to more coalescing,
lower register pressure, and less spilling.
llvm-svn: 103939
2010-05-17 15:30:32 +00:00
David Chisnall
f9c4225af6
Pick the correct personality function based on the language. This prevents link failures when C/ObjC code uses __attribute__((cleanup())) (previously this was inserting references to two libstc++ symbols; the personality function and the __terminate() function).
...
This is still probably wrong for Objective-C++ and adds a couple of lines in CGException that should probably be in the CGObjCRuntime subclass. The personality function is now only looked up in one place in CGException though, so this should be easier to fix in the future.
llvm-svn: 103938
2010-05-17 13:49:20 +00:00
Howard Hinnant
05fa30d595
[rand.dist.bern.geo]
...
llvm-svn: 103937
2010-05-17 13:44:27 +00:00
Zhongxing Xu
188855abef
Remove unused member variable.
...
llvm-svn: 103936
2010-05-17 09:47:55 +00:00
Jakob Stoklund Olesen
7d22a81b61
Only use clairvoyance when defining a register, and then only if it has one use.
...
This makes allocation independent on the ordering of use-def chains.
llvm-svn: 103935
2010-05-17 04:50:57 +00:00
Jakob Stoklund Olesen
f915d14955
Eliminate a hash table probe when killing virtual registers.
...
llvm-svn: 103934
2010-05-17 03:26:09 +00:00
Jakob Stoklund Olesen
edd3d9db13
Execute virtreg kills immediately instead of after processing all uses.
...
This is safe to do because the physreg has been marked UsedInInstr and the kill flag will be set on the last operand using the virtreg if there are more then one.
llvm-svn: 103933
2010-05-17 03:26:06 +00:00
Eli Friedman
b41ad0fbea
PR7117: Make sure we don't lose the calling convention for K&R-style
...
definitions.
llvm-svn: 103932
2010-05-17 02:50:18 +00:00