Commit Graph

75525 Commits

Author SHA1 Message Date
Eli Friedman 5866fe306d Fix for PR5967: Make const-marking for LLVM globals correct for cases requiring
run-time initialization, and emit run-time initializers aggresively to avoid
ordering issues with deferred globals.

llvm-svn: 92976
2010-01-08 00:50:11 +00:00
Douglas Gregor fa1e36d0de Improve the fix-its for -Wparentheses to ensure that the fix-it
suggestions follow recovery. Additionally, add a note to these
diagnostics which suggests a fix-it for changing the behavior to what
the user probably meant. Examples:

t.cpp:2:9: warning: & has lower precedence than ==; == will be evaluated first
      [-Wparentheses]
  if (i & j == k) {
        ^~~~~~~~
          (     )
t.cpp:2:9: note: place parentheses around the & expression to evaluate it first
  if (i & j == k) {
        ^
      (    )

t.cpp:14:9: warning: using the result of an assignment as a condition
without
      parentheses [-Wparentheses]
  if (i = f()) {
      ~~^~~~~
      (      )
t.cpp:14:9: note: use '==' to turn this assignment into an equality
comparison
  if (i = f()) {
        ^
        ==

llvm-svn: 92975
2010-01-08 00:20:23 +00:00
David Chisnall df34917a38 Export a public symbol for classes with the GNU runtime.
llvm-svn: 92973
2010-01-08 00:14:31 +00:00
Eric Christopher e0297b9206 Remove extraneous include.
llvm-svn: 92972
2010-01-08 00:05:33 +00:00
Tobias Grosser bd9f372f0a Add assert to check dominance dfs numbers.
Compare the dominance information calculated using a dominance tree walk to the
information calculated based on DFS numbers, if XDEBUG is enabled.

llvm-svn: 92969
2010-01-07 23:50:41 +00:00
Tobias Grosser bbe375e2fe Remove workaround in PostDominators
Remove a FIXME and unify code that was necessary to work around broken
updateDFSNumbers().  Before updateDFSNumbers() did not work correctly for post
dominators.

llvm-svn: 92968
2010-01-07 23:50:25 +00:00
Tobias Grosser 35e234bf24 Fix DFS number calculation for postdominators
The DFS number calculation for postdominators was broken. In the case of
multiple exits that form the post dominator root nodes, do not iterate over
all exits, but start from the virtual root node. Otherwise bbs, that are not
post dominated by any exit but by the virtual root node, will never be assigned
a DFS number.

llvm-svn: 92967
2010-01-07 23:50:06 +00:00
Chris Lattner 35d3b9dcd0 teach ComputeNumSignBits to look through PHI nodes.
llvm-svn: 92964
2010-01-07 23:44:37 +00:00
Chris Lattner 7b6a068801 filecheckize
llvm-svn: 92963
2010-01-07 23:42:23 +00:00
Chris Lattner 3057c37959 Enhance instcombine to reason more strongly about promoting computation
that feeds into a zext, similar to the patch I did yesterday for sext.
There is a lot of room for extension beyond this patch.

llvm-svn: 92962
2010-01-07 23:41:00 +00:00
Ted Kremenek 32b79317a2 More crashtracer enhancements to CIndex. When "popping" a crashtracer string
restore to the one most recently created.

llvm-svn: 92959
2010-01-07 23:13:53 +00:00
Douglas Gregor b15af899fb Add an "implicit" bit to CXXThisExpr, so that we can track
implicitness without losing track of the (logical or actual) location
where "this" would occur in the source.

llvm-svn: 92958
2010-01-07 23:12:05 +00:00
Fariborz Jahanian bc6811c32e Fixes a bug where we were rewriting two definitions of
_objc_method (part of radar 7490408).

llvm-svn: 92957
2010-01-07 22:51:18 +00:00
Mike Stump a52cf2ca3f Add checker for type infos.
llvm-svn: 92956
2010-01-07 22:50:03 +00:00
Ted Kremenek 7a5ede2ff0 Tidy up crashtracer logic in CIndex.
llvm-svn: 92955
2010-01-07 22:49:05 +00:00
Mike Stump 0015eb93c6 Add checked for VTTs.
llvm-svn: 92954
2010-01-07 22:28:10 +00:00
Mike Stump 24e9b0048c Detailed vtable checker.
llvm-svn: 92953
2010-01-07 22:21:26 +00:00
Fariborz Jahanian 1444230c40 Fixes a bug in my last patch (related to radar 7490331).
llvm-svn: 92952
2010-01-07 22:15:31 +00:00
Chris Lattner dab2cd543f Fix rdar://7517201, a regression introduced by r92849.
When folding a and(any_ext(load)) both the any_ext and the
load have to have only a single use.

This removes the anyext-uses.ll testcase which started failing
because it is unreduced and unclear what it is testing.

llvm-svn: 92950
2010-01-07 21:59:23 +00:00
Chris Lattner 88de38453f factor this code better and reduce nesting at the same
time, no functionality change.

llvm-svn: 92948
2010-01-07 21:53:27 +00:00
David Greene 0b09877c3d Revert r92939. These intrinsics get matched to LLVM instructions,
so removing at Chris' request.

llvm-svn: 92947
2010-01-07 21:43:58 +00:00
Evan Cheng 16b75ce19c APInt'fy TargetLowering::SimplifySetCC to fix PR5963.
llvm-svn: 92943
2010-01-07 20:58:44 +00:00
Mike Stump 441793352d 1/2 off all structs should not have any virtual functions.
Replace magic numbers with uuids.

llvm-svn: 92941
2010-01-07 20:55:28 +00:00
David Greene 5b053c5278 Add some "missing" instrinsics to make the SSE intrinsic set a bit more
orthogonal.

llvm-svn: 92939
2010-01-07 19:47:43 +00:00
Benjamin Kramer b757a82902 Simplify code. No intended functionality/performance change.
llvm-svn: 92938
2010-01-07 19:46:15 +00:00
Eric Christopher 9f569bdf38 If the data requires a relocation then don't attempt to
add it to the constant pool for fast-isel. We already
don't add it for the normal case.

llvm-svn: 92934
2010-01-07 19:45:14 +00:00
Eric Christopher 36ef435eca We need to put any kind of data with a relocation into a
not-readonly segment on darwin.

llvm-svn: 92933
2010-01-07 19:44:05 +00:00
Mike Stump 2a83635337 Add a descriptive tag to each line to make the exact differences
easier to understand.

llvm-svn: 92932
2010-01-07 19:39:43 +00:00
Devang Patel fcfee0ff35 Use separate namespace for named metadata.
llvm-svn: 92931
2010-01-07 19:39:36 +00:00
John McCall 64fe233704 When parsing an identifier as an expression in C++, only try to annotate it
as a type or scope token if the next token requires it.

This eliminates a lot of redundant lookups in C++, but there's room for
improvement;  a better solution would do a single lookup whose kind and
results would be passed through the parser.

llvm-svn: 92930
2010-01-07 19:29:58 +00:00
Mike Stump bd0c5da5fc Don't use two argument mixing function.
llvm-svn: 92929
2010-01-07 19:24:27 +00:00
Mike Stump a771b0ad52 Also generate the .s files.
llvm-svn: 92928
2010-01-07 19:19:39 +00:00
Mike Stump 53b926c56f Add a testcase generator for vtable/rtti testing. WIP.
llvm-svn: 92927
2010-01-07 18:58:28 +00:00
Kovarththanan Rajaratnam d4ca3e3f06 Fix occurrence typo
llvm-svn: 92926
2010-01-07 18:46:52 +00:00
Fariborz Jahanian 9ab6349f2a Avoid error when convering a pointer to integer in
rewriting.

llvm-svn: 92925
2010-01-07 18:31:42 +00:00
Fariborz Jahanian 0f3aecf272 Fix rewriting of ivars. Fixes radar 7490331.
llvm-svn: 92924
2010-01-07 18:18:32 +00:00
Kovarththanan Rajaratnam 49c8da95a3 Convert from char pointer to char array
llvm-svn: 92923
2010-01-07 18:11:14 +00:00
Ted Kremenek db2ef3732f Fix typo: rename Rewriter::getRewritenText() -> Rewriter::getRewrittenText().
llvm-svn: 92922
2010-01-07 18:00:35 +00:00
Chris Lattner 9e4e45a3b6 constant materialization could be improved.
llvm-svn: 92921
2010-01-07 17:53:10 +00:00
Benjamin Kramer 2b45998b7b Kill dead store.
llvm-svn: 92920
2010-01-07 17:50:57 +00:00
Benjamin Kramer d64b952e5e Remove dead variable.
llvm-svn: 92919
2010-01-07 17:29:08 +00:00
Benjamin Kramer cdb3889791 Use pop_back_val instead of back()+pop_back.
llvm-svn: 92918
2010-01-07 17:27:56 +00:00
Kovarththanan Rajaratnam b53c7d4d9d Tigthen scope of local char array
llvm-svn: 92917
2010-01-07 16:01:54 +00:00
Benjamin Kramer 76e2766442 Use a do-while loop instead of while + boolean.
llvm-svn: 92912
2010-01-07 13:50:07 +00:00
Nuno Lopes 950d5b2cd3 fix PR5869: mangle static symbols like gcc does to make it easier to diff symbol tables
llvm-svn: 92911
2010-01-07 09:36:51 +00:00
Duncan Sands 1949de7b81 Correct spelling.
llvm-svn: 92910
2010-01-07 09:05:26 +00:00
Duncan Sands f117880ab0 Be less stingy as to how many selects and phi nodes we
are prepared to look through.

llvm-svn: 92898
2010-01-07 05:48:42 +00:00
Douglas Gregor 3a08dcc156 Test linkage of typeinfo and typeinfo names for class templates
llvm-svn: 92897
2010-01-07 04:09:30 +00:00
Douglas Gregor 47ed966813 More trivial optimizations to a function well outside the critical path
llvm-svn: 92896
2010-01-07 02:24:06 +00:00
John McCall 0237485287 Improve the lead diagnostic for C++ object subscript expressions with
no viable overloads.  Use a different message when the class provides
no operator[] overloads at all; use it for operator(), too.

Partially addresses PR 5900.

llvm-svn: 92894
2010-01-07 02:04:15 +00:00