Commit Graph

64537 Commits

Author SHA1 Message Date
Anders Carlsson 5c5f160c7f Diagnose unused expression results for all statements, just not compound statements.
llvm-svn: 77631
2009-07-30 22:39:03 +00:00
Anders Carlsson 499de4252d Add casts to avoid a bunch of unused expr warnings. (They aren't reported right now due to a bug that I intend to fix). Ted, please review.
llvm-svn: 77630
2009-07-30 22:37:41 +00:00
Mike Stump 658fe02d17 Canonicalize else spacing.
llvm-svn: 77629
2009-07-30 22:28:39 +00:00
Anders Carlsson 59a2ab9720 Factor code out into a DiagnoseUnusedExprResult function.
llvm-svn: 77628
2009-07-30 22:17:18 +00:00
David Goodwin 0bfc8312c2 Darwin assembler now recognizes "orn", so remove workaround.
llvm-svn: 77627
2009-07-30 21:51:41 +00:00
Mike Stump a523b2d7a0 Note some other limitations.
llvm-svn: 77626
2009-07-30 21:47:44 +00:00
David Goodwin ce774e2383 Darwin assembler now supports "rrx", so remove workaround.
llvm-svn: 77625
2009-07-30 21:38:40 +00:00
Daniel Dunbar a91dd9bf5f Twine: Directly support int, long, and long long types.
- This should resolve Cygwin gcc ambiguities.

llvm-svn: 77624
2009-07-30 21:15:14 +00:00
Dan Gohman f4362da1b7 Use CallbackVH in AliasSetTracker to avoid getting stuck with
dangling Value*s.

llvm-svn: 77623
2009-07-30 20:21:41 +00:00
David Goodwin 79c079b478 Cleanup and include code selection for some frame index cases.
llvm-svn: 77622
2009-07-30 18:56:48 +00:00
Devang Patel 6352444635 Start using DebugInfoFinder.
llvm-svn: 77621
2009-07-30 18:56:46 +00:00
Devang Patel 3f4ab29f45 Do not use getNamedValue() to lookup NamedMDNode. NamedMDNode is not a GlobalValue.
Thanks Benjamin Kramer!

llvm-svn: 77619
2009-07-30 18:46:29 +00:00
Devang Patel 57eae13c8d Fix MetadataBase::classof().
Thanks Benjamin Kramer!

llvm-svn: 77618
2009-07-30 18:45:09 +00:00
Daniel Dunbar bd8556e0fb Twine: Use raw_ostream::write_hex, remove unused itohexstr method.
llvm-svn: 77617
2009-07-30 18:30:19 +00:00
Daniel Dunbar da6efdcd22 Remove unintended changes.
llvm-svn: 77616
2009-07-30 18:29:44 +00:00
Devang Patel 3b4e827f2b s/DebugInfoEnumerator/DebugInfoFinder/g
llvm-svn: 77615
2009-07-30 18:25:15 +00:00
Daniel Dunbar 6c9629b92a Add raw_ostream::write_hex
llvm-svn: 77614
2009-07-30 18:21:23 +00:00
Daniel Dunbar 4d6aa73d6b Remove itohexstr, which only had one user.
llvm-svn: 77613
2009-07-30 18:18:54 +00:00
Mike Stump 57724c2f7e Update based upon comments. Explain why we have an assert.
llvm-svn: 77612
2009-07-30 18:01:44 +00:00
David Goodwin cab137d294 Add missing D* register clobbers for Thumb-2 call.
llvm-svn: 77611
2009-07-30 18:01:09 +00:00
Mike Stump 44b8e90369 We'll also need a vtable pointer if we have virtual bases.
llvm-svn: 77610
2009-07-30 17:53:53 +00:00
Douglas Gregor 833834fcab What luck! Clang obtains support for refering to members of the
current instantiation when that current instantiation is a class
template partial specialization.

llvm-svn: 77609
2009-07-30 17:50:56 +00:00
Fariborz Jahanian aa01d2a532 Patch for future ir-gen for destructor calls.
llvm-svn: 77608
2009-07-30 17:49:11 +00:00
Ted Kremenek 118cef36b8 Lexically order files.
llvm-svn: 77607
2009-07-30 17:41:23 +00:00
Douglas Gregor 1530138fd0 Support out-of-line definitions of the members of class template
partial specializations.

llvm-svn: 77606
2009-07-30 17:40:51 +00:00
Daniel Dunbar 132f78395a Twines: Don't allow implicit conversion from integers, this is too tricky.
llvm-svn: 77605
2009-07-30 17:37:43 +00:00
Devang Patel 5262314b8d walk DbgRegionStartInst and DbgRegionEndInst
llvm-svn: 77604
2009-07-30 17:30:23 +00:00
Devang Patel 6d39426d68 Fix comment.
llvm-svn: 77603
2009-07-30 17:25:33 +00:00
Dan Gohman 703edcc553 Minor whitespace tidiness.
llvm-svn: 77602
2009-07-30 17:04:07 +00:00
Dan Gohman 013f007762 Rename GRAD to GR32_AD, to follow the naming convention of other
classes. And define its SubRegClassList.

llvm-svn: 77601
2009-07-30 17:02:08 +00:00
Douglas Gregor 4e5a974c00 Initialize an otherwise-wild pointer. Fixes a crashy analyzer
llvm-svn: 77599
2009-07-30 16:10:26 +00:00
Chris Lattner c667b60b93 add a random codegen deficiency.
llvm-svn: 77598
2009-07-30 16:08:58 +00:00
Benjamin Kramer 5656e4fcd3 fix a unitialized pointer in NamedMDNode (and reenable unittest)
llvm-svn: 77597
2009-07-30 15:35:55 +00:00
Benjamin Kramer 2a94b3dcdb fix cmake build
llvm-svn: 77589
2009-07-30 10:38:43 +00:00
Zhongxing Xu 4b5d6bc33a simple fixes.
llvm-svn: 77587
2009-07-30 09:14:54 +00:00
Sanjiv Gupta a53e686d96 Allow targets to define libcall names for mem(cpy,set,move) intrinsics, rather than hardcoding them in DAG lowering.
llvm-svn: 77586
2009-07-30 09:12:56 +00:00
Zhongxing Xu 4b03d4913a Make AnalysisManager into its own source file and a pure data management class.
Move all components creation code into AnalysisConsumer::DigestAnalyzerOptions().

llvm-svn: 77585
2009-07-30 09:11:52 +00:00
Evan Cheng 92df9c3323 Add a note.
llvm-svn: 77584
2009-07-30 08:56:19 +00:00
Evan Cheng f7ce11cf71 I've changed the semantics of MERGE_VALUES a bit. It's now allowed to live until scheduling. It's deleted when the scheduler translate DAG nodes to machine instructions.
This is currently used by X86 to handle atomic_load_add when the output of the node is not used. I believe there is a better solution. But I find MERGE_VALUES useful for selecting multi-output node when the dead output can be selected as a IMPLICIT_DEF.

llvm-svn: 77583
2009-07-30 08:44:08 +00:00
Evan Cheng e62288fdd4 Optimize some common usage patterns of atomic built-ins __sync_add_and_fetch() and __sync_sub_and_fetch.
When the return value is not used (i.e. only care about the value in the memory), x86 does not have to use add to implement these. Instead, it can use add, sub, inc, dec instructions with the "lock" prefix.

This is currently implemented using a bit of instruction selection trick. The issue is the target independent pattern produces one output and a chain and we want to map it into one that just output a chain. The current trick is to select it into a merge_values with the first definition being an implicit_def. The proper solution is to add new ISD opcodes for the no-output variant. DAG combiner can then transform the node before it gets to target node selection.

Problem #2 is we are adding a whole bunch of x86 atomic instructions when in fact these instructions are identical to the non-lock versions. We need a way to add target specific information to target nodes and have this information carried over to machine instructions. Asm printer (or JIT) can use this information to add the "lock" prefix.

llvm-svn: 77582
2009-07-30 08:33:02 +00:00
Daniel Dunbar 6afdc5e694 Switch obvious clients to Twine instead of utostr (when they were already using
a Twine, e.g., for names).
 - I am a little ambivalent about this; we don't want the string conversion of
   utostr, but using overload '+' mixed with string and integer arguments is
   sketchy. On the other hand, this particular usage is something of an idiom.

llvm-svn: 77579
2009-07-30 04:20:37 +00:00
Sanjiv Gupta 8787861004 Keep track of references to mem(cpy,move,set) and then print only one extern
declaration for them.

llvm-svn: 77578
2009-07-30 04:15:15 +00:00
Daniel Dunbar 7be573f05a Update CMakeLists.txt
llvm-svn: 77577
2009-07-30 03:55:04 +00:00
Daniel Dunbar e8b3236284 Twine: Provide [u]int{32,64} conversions via implicit constructors instead of
explicitly.

llvm-svn: 77576
2009-07-30 03:47:15 +00:00
Argyrios Kyrtzidis fc2ed30ab8 Fix Selector <-> GlobalSelector conversion.
llvm-svn: 77575
2009-07-30 03:42:08 +00:00
Ryan Flynn 7d470f3466 PR3679 - handle #pragma weak
llvm-svn: 77573
2009-07-30 03:15:39 +00:00
Daniel Dunbar 874450c433 Add -fblocks.
llvm-svn: 77571
2009-07-30 02:43:05 +00:00
Andreas Bolka 31d9fa2ad1 Equal SCEVs of a subscript give rise to dependence.
llvm-svn: 77570
2009-07-30 02:26:01 +00:00
Daniel Dunbar 54914e2b3a Disable the NamedMDNodeTest, it is failing everywhere.
llvm-svn: 77569
2009-07-30 02:08:27 +00:00
Nate Begeman 50b69eaa36 Typo
llvm-svn: 77568
2009-07-30 02:00:06 +00:00