1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 20:43:44 +02:00
Commit Graph

46579 Commits

Author SHA1 Message Date
Owen Anderson
d4e2474506 Down with static variables!
Part one of many.

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

llvm-svn: 71783
2009-05-14 18:41:18 +00:00
Bill Wendling
78f6980946 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
3449db3f16 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
6571391191 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
e740d81911 Use abs64 in one more place.
llvm-svn: 71775
2009-05-14 16:47:34 +00:00
Jim Grosbach
f3e59935c3 clean up line-wrapping
llvm-svn: 71771
2009-05-14 15:44:15 +00:00
Owen Anderson
c778e8bf21 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
661f67bd0c Fix for PR4124. Make TwoAddressFormPass::FindLastUseInMBB return the real last use.
llvm-svn: 71769
2009-05-14 04:26:30 +00:00
Jim Grosbach
bed3aeff20 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
3ae08059b5 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
329994e9d4 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
a68cfc68f8 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
35ad062490 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
40d13bf382 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
ab98a2c258 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
8c8c81cd78 Merge adjacent conditional.
llvm-svn: 71741
2009-05-13 23:35:38 +00:00
Bob Wilson
516a55feaa Remove an unused variable.
llvm-svn: 71740
2009-05-13 23:31:30 +00:00
Bob Wilson
c739ce57db 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
6666fa7a2c Fix whitespacing (space after switch).
llvm-svn: 71738
2009-05-13 23:23:20 +00:00
Jim Grosbach
024feec42e 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
a09e38894a Add nounwind to this test.
llvm-svn: 71734
2009-05-13 22:29:12 +00:00
Bill Wendling
c76422f45d Remove too large testcase.
llvm-svn: 71730
2009-05-13 21:51:26 +00:00
Evan Cheng
9bd08f0cde 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
cdae5f7598 Indentation.
llvm-svn: 71724
2009-05-13 21:39:20 +00:00
Bill Wendling
e421c8f63d 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
d0e1e29fb7 Handle some additonal cases of external weak globals.
llvm-svn: 71717
2009-05-13 20:55:30 +00:00
Bill Wendling
35584a26be 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
da2e1e314b Testcase for 71688.
llvm-svn: 71691
2009-05-13 18:33:24 +00:00
Dale Johannesen
a3b4fb31a1 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
e5e368472b garbage allocation is not a good idea :)
llvm-svn: 71680
2009-05-13 18:02:09 +00:00
John Mosby
6b2d45fe66 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
eb2f327449 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
ad40927f6a 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
662a50d8c0 Fix typo.
llvm-svn: 71656
2009-05-13 13:13:18 +00:00
Duncan Sands
6f8d5b489a 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
Chris Lattner
a5add81e91 add IVUsers.cpp
llvm-svn: 71646
2009-05-13 06:28:04 +00:00
Chris Lattner
53ddc0fba1 add ShrinkWrapping.cpp
llvm-svn: 71645
2009-05-13 06:27:38 +00:00
Chris Lattner
927ebd34e2 Fix PR4206 - crash in simplify lib calls
llvm-svn: 71644
2009-05-13 06:26:11 +00:00
Lang Hames
f6a337d7fb Fix for PR4121. If TwoAddressInstructionPass removes a dead def, and the regB
operand was killed, the kill needs to be removed from regB's VarInfo.

llvm-svn: 71635
2009-05-13 04:18:47 +00:00
Dan Gohman
32cd719eba Add three new helper routines, getNoopOrZeroExtend,
getNoopOrSignExtend, and getTruncateOrNoop. These are similar
to getTruncateOrZeroExtend etc., except that they assert that
the conversion is either not widening or narrowing, as
appropriate. These will be used in some upcoming fixes.

llvm-svn: 71632
2009-05-13 03:46:30 +00:00
Dale Johannesen
18cc7c12b7 Add an int64_t variant of abs, for host environments
without one.  Use it where we were using abs on
int64_t objects.
(I strongly suspect the casts to unsigned in the
fragments in LoopStrengthReduce are not doing whatever
the original intent was, but the obvious change to
uint64_t doesn't work.  Maybe later.)

llvm-svn: 71612
2009-05-13 00:24:22 +00:00
Jim Grosbach
4bb5e9d1df Add support for GCC compatible builtin setjmp and longjmp intrinsics. This is
a supporting preliminary patch for GCC-compatible SjLJ exception handling. Note that these intrinsics are not designed to be invoked directly by the user, but
rather used by the front-end as target hooks for exception handling.

llvm-svn: 71610
2009-05-12 23:59:14 +00:00
Evan Cheng
e43bfc153e If header of inner loop is aligned, do not align the outer loop header. We don't want to add nops in the outer loop for the sake of aligning the inner loop.
llvm-svn: 71609
2009-05-12 23:58:14 +00:00
Evan Cheng
c7f7276825 Teach TransferDeadness to delete truly dead instructions if they do not produce side effects.
llvm-svn: 71606
2009-05-12 23:07:00 +00:00
Dale Johannesen
edbd4d5c4c Slightly improve generated code in a degenerate case.
Should remove a warning from MSVC.

llvm-svn: 71603
2009-05-12 22:32:29 +00:00
Jim Grosbach
4861b683a8 correct register class for tADDspi to GPR since the register will always be SP
llvm-svn: 71602
2009-05-12 22:30:18 +00:00
Bill Wendling
a6f172b0f2 More MSVC fixes -- class/struct conflicts.
llvm-svn: 71601
2009-05-12 21:55:29 +00:00
Bill Wendling
4698f862f3 Use struct instead of class to make MCVS compile.
llvm-svn: 71600
2009-05-12 21:50:43 +00:00