Commit Graph

70843 Commits

Author SHA1 Message Date
Douglas Gregor 98261735b4 StringSwitch-ify attribute name mapping.
llvm-svn: 85491
2009-10-29 05:26:58 +00:00
Chris Lattner 0c778f70e9 add interpreter support for indirect goto / blockaddress. The interpreter
now correctly runs clang's test/CodeGen/indirect-goto.c.  The JIT will abort
on it until someone feels compelled to implement this.

llvm-svn: 85488
2009-10-29 05:26:09 +00:00
Chris Lattner 08bb9ef7f7 make this interpretable.
llvm-svn: 85487
2009-10-29 05:25:27 +00:00
Ted Kremenek 1f0a56e4c9 Fix an insidious bug in RegionStore::RemoveDeadBindings() pointed out
by Zhongxing Xu.  RemoveDeadBindings() would falsely prune
SymbolicRegions from the store that wrapped derived symbols whose
liveness could only be determined after scanning the store.

llvm-svn: 85484
2009-10-29 05:14:17 +00:00
Zhongxing Xu b71fae8098 add newline to make cl.exe happy.
llvm-svn: 85483
2009-10-29 05:07:14 +00:00
Chris Lattner e963d092d8 add two new and very exhaustive preprocessor tests, patch by
Ken Dyck!

llvm-svn: 85482
2009-10-29 04:55:36 +00:00
Chris Lattner d0952749f7 simplify intmax setup, patch by Ken Dyck!
llvm-svn: 85481
2009-10-29 04:54:24 +00:00
Zhongxing Xu 0590837d34 fix 80-col.
llvm-svn: 85480
2009-10-29 04:41:24 +00:00
Chris Lattner e9006fe142 greatly improve the LLVM IR bitcode encoding documentation,
patch by Peter Housel!

llvm-svn: 85479
2009-10-29 04:25:46 +00:00
Zhongxing Xu d74ffbde67 Explicitly convert to double to suppress Visual C++ 2008 build error C2668 pow is ambiguous call to overloaded function
llvm-svn: 85478
2009-10-29 03:43:06 +00:00
Jim Grosbach b352d76480 To get more thorough testing from llc-beta nightly runs, do dynamic stack
realignment regardless of whether it's strictly necessary.

llvm-svn: 85476
2009-10-29 02:41:21 +00:00
Daniel Dunbar 1a8a2e8e97 Remove some obsolete or unnecessary FIXMEs.
llvm-svn: 85475
2009-10-29 02:39:57 +00:00
Jim Grosbach cad78a7634 When the function is doing dynamic stack realignment, the spill slot will be
indexed via the stack pointer, even if a frame pointer is present. Update the
heuristic to place it nearest the stack pointer in that case, rather than
nearest the frame pointer.

llvm-svn: 85474
2009-10-29 02:33:47 +00:00
Daniel Dunbar 945577ce93 PR5328: Allow duplicatic -pedantic (and -pedantic-errors) options.
- clang-cc doesn't care about their relative order with other -W options.

llvm-svn: 85473
2009-10-29 02:24:45 +00:00
Daniel Dunbar b0b18615e2 Kill off MakeFormattedString helper function.
llvm-svn: 85472
2009-10-29 02:24:37 +00:00
Zhongxing Xu 6b8bfb376b Move NullDeref and UndefDeref into their own checker.
Add a CheckLocation() interface to Checker.
Now ImplicitNullDeref nodes are cached in NullDerefChecker.
More cleanups follow.

llvm-svn: 85471
2009-10-29 02:09:30 +00:00
Johnny Chen 8107289624 Sorry to break the build.
I was trying to check the WIP file to some local repository, but ended up
checking in the llvm repository.  Oops!

llvm-svn: 85470
2009-10-29 02:04:53 +00:00
Daniel Dunbar 38b6279ce4 Reject -I- in driver instead of clang-cc.
llvm-svn: 85469
2009-10-29 01:53:44 +00:00
Daniel Dunbar 938eb27b25 Formatting fixes.
llvm-svn: 85468
2009-10-29 01:53:18 +00:00
Johnny Chen c3d9a47d03 Minor tweak to forgo the the curly braces for most case blocks, except when
declaring local variables.

llvm-svn: 85467
2009-10-29 01:45:07 +00:00
Chris Lattner ee8b951e73 teach various passes about blockaddress. We no longer
crash on any clang tests.

llvm-svn: 85465
2009-10-29 01:21:20 +00:00
Chris Lattner 29fb551a36 make this more interesting, test the static const array.
llvm-svn: 85464
2009-10-29 01:20:34 +00:00
Dale Johannesen 8829fc3a18 When there is a 2-instruction spill sequence, record
the second (store) instruction in SpillSlotToUsesMap
consistently.  I don't think this matters functionally,
but it's cleaner and Evan wants it this way.

llvm-svn: 85463
2009-10-29 01:15:40 +00:00
Ted Kremenek 33335b1504 Add test case for <rdar://problem/7342806>.
llvm-svn: 85462
2009-10-29 00:49:46 +00:00
Douglas Gregor f7b87cb529 [llvm up]
Switch a few ugly switch-on-string-literal constructs to use the new
llvm::StringSwitch.

llvm-svn: 85461
2009-10-29 00:41:01 +00:00
Bill Wendling 3505c94923 Don't put in these EH changes.
llvm-svn: 85460
2009-10-29 00:37:35 +00:00
Douglas Gregor a6f3e7edeb A switch-on-string-literal construct that is a nice alternative to
cascading "ifs" of strcmps/memcmps.

llvm-svn: 85459
2009-10-29 00:34:30 +00:00
Chris Lattner be060382e9 teach ValueMapper about BlockAddress', making bugpoint a lot more useful.
llvm-svn: 85458
2009-10-29 00:31:02 +00:00
Chris Lattner cf5a47d63d unindent massive blocks, no functionality change.
llvm-svn: 85457
2009-10-29 00:28:30 +00:00
Edward O'Callaghan 07d6005bdc Nested function test in compiler-rt should not be run under Clang.
llvm-svn: 85456
2009-10-29 00:27:08 +00:00
Bill Wendling a8eceedb82 Reverting r85338 for now. It's causing a bootstrap failure on PPC darwin9.
--- Reverse-merging r85338 into '.':
U    lib/CodeGen/SimpleRegisterCoalescing.cpp
U    lib/CodeGen/SimpleRegisterCoalescing.h

llvm-svn: 85454
2009-10-29 00:22:16 +00:00
Chris Lattner edc56ef41c optimize out some ifdefs.
llvm-svn: 85453
2009-10-29 00:22:00 +00:00
Edward O'Callaghan 7c1cc70a90 Fix test suit for last CMake changes to CompilerRT.
llvm-svn: 85452
2009-10-29 00:16:23 +00:00
Dan Gohman d7db2dedaa Add indirectbr and blockaddress to the vim syntax highlighting file.
llvm-svn: 85451
2009-10-29 00:14:44 +00:00
John Thompson e413e88f2e Fix some Window-isms to get these tests to pass on Windows.
llvm-svn: 85450
2009-10-29 00:10:42 +00:00
Dan Gohman 3903320a48 Add a hasAddressTaken for BasicBlock.
llvm-svn: 85449
2009-10-29 00:09:08 +00:00
Edward O'Callaghan a55dd008ad Update CMake build system with target arch source file lists.
llvm-svn: 85448
2009-10-29 00:07:46 +00:00
Douglas Gregor 21610380de Implement support for semantic checking and template instantiation of
class template partial specializations of member templates. Also,
fixes a silly little bug in the marking of "used" template parameters
in member templates. Fixes PR5236.

llvm-svn: 85447
2009-10-29 00:04:11 +00:00
Chris Lattner 6c4d255bf3 Implement clang support for indirect branch and address of label
using the new LLVM support for this.  This is temporarily hiding
behind horrible and ugly #ifdefs until the time when the optimizer
is stable (hopefully a week or so).  Until then, lets make it "opt in" :)

llvm-svn: 85446
2009-10-28 23:59:40 +00:00
Chris Lattner 48d9995d2b add IRBuilder support for IndirectBr
llvm-svn: 85445
2009-10-28 23:25:00 +00:00
Ted Kremenek 1c9401ec15 Unused ivars checker: also check methods in categories that are defined in the same translation unit. Fixes <rdar://problem/6260004>.
llvm-svn: 85442
2009-10-28 22:18:22 +00:00
Bob Wilson 3ab552ec74 Reimplement BranchFolding change to avoid tail merging for a 1 instruction
common tail, except when the OptimizeForSize function attribute is present.
Radar 7338114.

llvm-svn: 85441
2009-10-28 22:10:20 +00:00
Steve Naroff f0c8611d3f Fix <rdar://problem/7330784>. Avoid crashing on 'Class<p>' when generating meta-data for a class.
llvm-svn: 85440
2009-10-28 22:03:49 +00:00
Dale Johannesen 14f162d9dc When we generate spill code, then decide we don't need
to spill after all, we weren't handling 2-instruction
spill sequences correctly (PPC Altivec).  We need to
remove the store in this case.  Removing the other
instruction(s) would be goodness but is not needed for
correctness, and isn't done here.  7331562.

llvm-svn: 85437
2009-10-28 21:56:18 +00:00
Eric Christopher 1fd4c577d2 Make sure we return the right sized type here.
llvm-svn: 85436
2009-10-28 21:32:16 +00:00
Mike Stump 5179f308a2 Refine __builtin_object_size. Don't try and get a size for things
that don't have sizes.

llvm-svn: 85435
2009-10-28 21:22:24 +00:00
Fariborz Jahanian 29baa2b1ba Minor cleanup.
llvm-svn: 85434
2009-10-28 21:07:28 +00:00
Fariborz Jahanian f1639fffbc Code gen for array construction - WIP
llvm-svn: 85432
2009-10-28 20:55:41 +00:00
Bob Wilson 97b9312663 Revert r85346 change to control tail merging by CodeGenOpt::Level.
I'm going to redo this using the OptimizeForSize function attribute.

llvm-svn: 85426
2009-10-28 20:46:46 +00:00
Steve Naroff 58bd62d190 Remove _clang_initCXLookupHint() and _clang_getCursorWithHint(). Related to <rdar://problem/7310688>.
Localize the optimization to ResolveLocationInAST(). The last valid AST location is now stored with ASTUnit. There still isn't optimal, however it's an improvement (with a much cleaner API). Having the client manage an "hint" is error prone and complex.

I wanted to land the major changes before finishing up the optimizations. 

llvm-svn: 85425
2009-10-28 20:44:47 +00:00