Commit Graph

46542 Commits

Author SHA1 Message Date
David Greene 3587eed2c4 Implement !if, analogous to $(if) in GNU make.
llvm-svn: 71815
2009-05-14 23:26:46 +00:00
Mike Stump 35ea2c9aa6 Reflow to fit 80-col.
llvm-svn: 71813
2009-05-14 23:23:37 +00:00
Mike Stump 13e4f10c53 Reflow to fit 80-col.
llvm-svn: 71812
2009-05-14 23:22:47 +00:00
David Greene 9bb2de17c2 Fix tests to not upset DejaGNU.
llvm-svn: 71811
2009-05-14 23:21:40 +00:00
David Greene d571b3c94b Graduate LLVM to the big leagues by embedding a LISP processor into TableGen.
Ok, not really, but do support some common LISP functions:

* car
* cdr
* null

llvm-svn: 71805
2009-05-14 22:38:31 +00:00
David Greene e917fff30f Implement a !foreach operator analogous to GNU make's $(foreach).
Use it on dags and lists like this:

class decls {
  string name;
}

def Decls : decls;

class B<list<string> names> : A<!foreach(Decls.name, names, !strconcat(Decls.name, ", Sr."))>;

llvm-svn: 71803
2009-05-14 22:23:47 +00:00
David Greene 98ed3c7273 Implement a !subst operation simmilar to $(subst) in GNU make to do
def/var/string substitution on generic pattern templates.  For example:

def Type;
def v4f32 : Type;
def TYPE : Type;

class GenType<Type t> {
  let type = !(subst TYPE, v4f32, t);
}

def TheType : GenType<TYPE>;

llvm-svn: 71801
2009-05-14 21:54:42 +00:00
Owen Anderson a379765d45 Dropped this #include by accident.
llvm-svn: 71798
2009-05-14 21:33:57 +00:00
Owen Anderson 5c46602d30 Make ManagedStatic threadsafe by using atomic operations.
llvm-svn: 71796
2009-05-14 21:26:50 +00:00
Owen Anderson a6947e9436 Add CompareAndSwap.
llvm-svn: 71795
2009-05-14 21:24:15 +00:00
David Greene e8f3b27e65 Implement !cast.
llvm-svn: 71794
2009-05-14 21:22:49 +00:00
David Greene 5d0c051e66 Operation Enhancements
Create an OpInit class to serve as a base for all operation Inits.

Move parsing of operation constructs to separate functions and reference
from multiple places.

Add some commented out new operations.  Coming soon.

llvm-svn: 71789
2009-05-14 20:54:48 +00:00
David Greene 9d3febea6a Fix PR4207.
If we're resolving a list element access and we're given a VarInit,
return a new VarListElementInit referencing the VarInit.

llvm-svn: 71787
2009-05-14 20:38:52 +00:00
Owen Anderson 672855eba8 Down with static variables!
Part one of many.

llvm-svn: 71785
2009-05-14 19:17:24 +00:00
Mike Stump 207fbf4320 Tag blocks with DW_AT_APPLE_block.
llvm-svn: 71784
2009-05-14 18:45:49 +00:00
Dale Johannesen 1ac1969e09 Reuse existing getUnderlyingObject instead of
adding another copy.

llvm-svn: 71783
2009-05-14 18:41:18 +00:00
Bill Wendling 6ddc11aedd Non-functionality changes:
- Reformatting.
- Use while() instead of do-while().
- Move simple constructors into .h file.

llvm-svn: 71782
2009-05-14 18:26:15 +00:00
Bill Wendling 3fe4cf745b Clean up this file fixing 80-column violations, bad formatting, etc. No functionality change.
llvm-svn: 71781
2009-05-14 18:16:46 +00:00
Bob Wilson 857fe4e425 Revert r71744. I must not have understood this correctly, because the
assertion is failing for some tests.

llvm-svn: 71779
2009-05-14 18:08:41 +00:00
Dale Johannesen f241df9abe Use abs64 in one more place.
llvm-svn: 71775
2009-05-14 16:47:34 +00:00
Jim Grosbach 1a18dcc34a clean up line-wrapping
llvm-svn: 71771
2009-05-14 15:44:15 +00:00
Owen Anderson d54eb23aa6 Add an Atomic.h to the System library, for providing a platform independent API
to low-level sync operations.

The only one present at the moment is MemoryFence(), and only for the platforms
for which I could easily discern the proper way to do it.  If your favorite platform
isn't represented, patches are welcome!

llvm-svn: 71770
2009-05-14 05:54:36 +00:00
Lang Hames 2646b72424 Fix for PR4124. Make TwoAddressFormPass::FindLastUseInMBB return the real last use.
llvm-svn: 71769
2009-05-14 04:26:30 +00:00
Jim Grosbach 06928192ae Update the names of the exception handling sjlj instrinsics to
llvm.eh.sjlj.* for better clarity as to their purpose and scope. Add
a description of llvm.eh.sjlj.setjmp to ExceptionHandling.html.
(llvm.eh.sjlj.longjmp documentation coming when that implementation is
added).

llvm-svn: 71758
2009-05-14 00:46:35 +00:00
Dan Gohman d4f63052c4 Add an assert to turn a segfault on an unsupported inline
asm construct into an assertion failure.

llvm-svn: 71757
2009-05-14 00:30:16 +00:00
Mike Stump 0e78566e02 Add dumping support for DW_AT_APPLE_isa and DW_AT_APPLE_block.
Radar 6867696

llvm-svn: 71750
2009-05-14 00:03:51 +00:00
Bill Wendling cdec744869 There's yet more ugliness (surprise!) in DebugInfo. This needs major reworking.
Basically, there was a situation where it was getting an empty vector and doing
a .back() on that. Which isn't cool.

llvm-svn: 71746
2009-05-13 23:55:49 +00:00
Bob Wilson b4c93b1ff7 The IfConverter::MergeBlocks method appears to be used only to merge a basic
block with its unique predecessor.  Change the code to assert if that is not
the case, instead of trying to handle situations where the block has
multiple predecessors.

llvm-svn: 71744
2009-05-13 23:54:13 +00:00
Jim Grosbach 4f915313ed Removing the HasBuiltinSetjmp flag and associated bits. Flagging the presence
of exception handling builtin sjlj targets in functions turns out not to 
be necessary. Marking the intrinsic implementation in the .td file as 
defining all registers is sufficient to get the context saved properly by 
the containing function.

llvm-svn: 71743
2009-05-13 23:50:53 +00:00
Bob Wilson 43f21dde1e Revert a portion of Dan's change r71018 that I'm convinced is wrong.
Dan was trying to catch the case where a basic block ends with a conditional
branch to the fall-through block.  In this case, all the instructions have
been moved out of FromBBI, leaving it empty.  It cannot end with a
conditional branch.  As the existing comment indicates, it will always fall
through to the next block.  If the block already had the next block (NBB)
listed as a successor, the preceding loop has a check for that and does not
remove it.  Thus, we need to check and add the successor only when it is
not already listed.

With Dan's change, the empty block often ends up with the fall-through
successor listed twice.  This exposed the problem in pr4195, where
CodePlacementOpt did not handle the same predecessor listed more than once.
It is also at least partially responsible for pr4202 and probably a similar
issue with Thumb branches being out of range.

llvm-svn: 71742
2009-05-13 23:48:58 +00:00
Bob Wilson 969bf71ca6 Merge adjacent conditional.
llvm-svn: 71741
2009-05-13 23:35:38 +00:00
Bob Wilson 43467d7daf Remove an unused variable.
llvm-svn: 71740
2009-05-13 23:31:30 +00:00
Bob Wilson 2371f4f70a Fix some typos and spelling and grammar, mostly in comments, but also one
field name.  No functional changes.

llvm-svn: 71739
2009-05-13 23:25:24 +00:00
Mike Stump 889285d467 Fix whitespacing (space after switch).
llvm-svn: 71738
2009-05-13 23:23:20 +00:00
Jim Grosbach 91fa781df3 Spelling correction s/builting/builtin/ and remove trailing whitespace in a few places
llvm-svn: 71735
2009-05-13 22:32:43 +00:00
Dan Gohman 6b43dd7664 Add nounwind to this test.
llvm-svn: 71734
2009-05-13 22:29:12 +00:00
Bill Wendling 7abc25ad68 Remove too large testcase.
llvm-svn: 71730
2009-05-13 21:51:26 +00:00
Evan Cheng ab0d23396a Run code placement optimization for targets that want it (arm and x86 for now).
llvm-svn: 71726
2009-05-13 21:42:09 +00:00
Evan Cheng ca528538a9 Indentation.
llvm-svn: 71724
2009-05-13 21:39:20 +00:00
Bill Wendling f7b83c7ae7 Change MachineInstrBuilder::addReg() to take a flag instead of a list of
booleans. This gives a better indication of what the "addReg()" is
doing. Remembering what all of those booleans mean isn't easy, especially if you
aren't spending all of your time in that code.

I took Jakob's suggestion and made it illegal to pass in "true" for the
flag. This should hopefully prevent any unintended misuse of this (by reverting
to the old way of using addReg()).

llvm-svn: 71722
2009-05-13 21:33:08 +00:00
Dale Johannesen 3181652363 Handle some additonal cases of external weak globals.
llvm-svn: 71717
2009-05-13 20:55:30 +00:00
Bill Wendling 1d601cdaf4 Move the bookkeeping of the debug scopes back to the place where it
belonged. The variable declaration stuff wasn't happy with it where it
was. Sorry that the testcase is so big. Bugpoint wasn't able to reduce it
successfully.

llvm-svn: 71714
2009-05-13 20:33:33 +00:00
Dale Johannesen 9e26d3708a Testcase for 71688.
llvm-svn: 71691
2009-05-13 18:33:24 +00:00
Dale Johannesen 69921959b4 Don't generate a select whose operand is load of a weak
external.  These may have address 0 and are not safe
to execute unconditionally.

llvm-svn: 71688
2009-05-13 18:25:07 +00:00
Chris Lattner 784ae669ab garbage allocation is not a good idea :)
llvm-svn: 71680
2009-05-13 18:02:09 +00:00
John Mosby ce06bb8a53 PEI: rename PEI.h to PrologEpilogInserter.h to adhere to file naming standard
llvm-svn: 71678
2009-05-13 17:52:11 +00:00
Chris Lattner 149546a6a0 calls in nothrow functions can be marked nothrow even if the callee
is not known to be nothrow.  This allows readnone/readonly functions
to be deleted even if we don't know whether the callee can throw.

llvm-svn: 71676
2009-05-13 17:39:14 +00:00
Sanjiv Gupta 4a71ae268b Run through the list of globals once and sectionize all types of globlas includeing declarations. Later emit them from their section lists.
llvm-svn: 71661
2009-05-13 15:13:17 +00:00
Duncan Sands ef8c8ec457 Fix typo.
llvm-svn: 71656
2009-05-13 13:13:18 +00:00
Duncan Sands 7e3c9e1bd9 Avoid getting a compiler warning
IVUsers.cpp: In member function ‘bool llvm::IVUsers::AddUsersIfInteresting(llvm::Instruction*)’:
 IVUsers.cpp:221: warning: ‘isSigned’ may be used uninitialized in this function
with gcc-4.3.

llvm-svn: 71654
2009-05-13 12:52:44 +00:00