1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00
Commit Graph

46417 Commits

Author SHA1 Message Date
Johnny Chen
aaaa46cee2 Print out a debug message when the reglist fails the sanity check for Thumb Ld/St Multiple.
llvm-svn: 129365
2011-04-12 17:09:04 +00:00
Rafael Espindola
5c5bb3e9a6 Fix the case of a .cfi_rel_offset before any .cfi_def_cfa_offset.
llvm-svn: 129362
2011-04-12 16:12:03 +00:00
Rafael Espindola
7c4de15c7b Implement .cfi_same_value.
llvm-svn: 129361
2011-04-12 15:31:05 +00:00
Cameron Zwarich
c05412175e Split a store of a VMOVDRR into two integer stores to avoid mixing NEON and ARM
stores of arguments in the same cache line. This fixes the second half of
<rdar://problem/8674845>.

llvm-svn: 129345
2011-04-12 02:24:17 +00:00
NAKAMURA Takumi
ea9ba22749 lib/Transforms/Instrumentation/CMakeLists.txt: Add LineProfiling.cpp to fix up r129340.
llvm-svn: 129343
2011-04-12 01:54:40 +00:00
Nick Lewycky
cbe911f7d8 Add support for line profiling. Very work-in-progress.
Use debug info in the IR to find the directory/file:line:col. Each time that location changes, bump a counter.

Unlike the existing profiling system, we don't try to look at argv[], and thusly don't require main() to be present in the IR. This matches GCC's technique where you specify the profiling flag when producing each .o file.

The runtime library is minimal, currently just calling printf at program shutdown time. The API is designed to make it possible to emit GCOV data later on.

llvm-svn: 129340
2011-04-12 01:06:09 +00:00
Nick Lewycky
a3308fd26f Consider ConstantAggregateZero as well as ConstantArray/Struct.
llvm-svn: 129338
2011-04-12 01:02:45 +00:00
Eric Christopher
72a09952de Fix typo.
llvm-svn: 129334
2011-04-12 00:48:08 +00:00
Nick Lewycky
7ee6960a5f Make IRBuilder support StringRef for building strings.
Also document that the global variables produced are mergable.

llvm-svn: 129330
2011-04-12 00:29:07 +00:00
Jim Grosbach
17ca2afa04 Tidy up a bit now that we're using the MemoryManager interface.
llvm-svn: 129328
2011-04-12 00:23:32 +00:00
Eric Christopher
b01713088d Match case for invalid constant error messages and add a new
test for invalid hexadecimals.

llvm-svn: 129326
2011-04-12 00:18:03 +00:00
Johnny Chen
58713f0ec2 A8.6.16 B
Encoding T1 (tBcc)
if cond == '1110' then UNDEFINED;

rdar://problem/9268681

llvm-svn: 129325
2011-04-12 00:14:49 +00:00
Dan Gohman
4eedbc29cd Fix reassociate to use a worklist instead of recursing when new
reassociation opportunities are exposed. This fixes a bug where
the nested reassociation expects to be the IR to be consistent,
but it isn't, because the outer reassociation has disconnected
some of the operands.  rdar://9167457

llvm-svn: 129324
2011-04-12 00:11:56 +00:00
Eric Christopher
b653bac7ce To avoid printing out multiple error messages for cases like:
.long 80+08

go ahead and assume that if we've got an Error token that we handled it
already. Otherwise if it's a token we can't handle then go ahead and
return the default error.

llvm-svn: 129322
2011-04-12 00:03:13 +00:00
Jakob Stoklund Olesen
ea0a2b637b Reuse live interval union between functions. This saves a bit of compile time
when compiling many small functions.

llvm-svn: 129321
2011-04-11 23:57:14 +00:00
Johnny Chen
443a6902bf Thumb disassembler was erroneously rejecting "blx sp" instruction.
rdar://problem/9267838

llvm-svn: 129320
2011-04-11 23:33:30 +00:00
Chris Lattner
2871dd44cb comment cleanup, use moveBefore instead of removeFromParent+insertBefore.
llvm-svn: 129319
2011-04-11 23:24:57 +00:00
Chris Lattner
2e4621a4a6 remove the StructRetPromotion pass. It is unused, not maintained and
has some bugs.  If this is interesting functionality, it should be 
reimplemented in the argpromotion pass.

llvm-svn: 129314
2011-04-11 23:09:44 +00:00
Wesley Peck
3ebf5b75d6 Fix an error in the MBlaze delay slot filler.
llvm-svn: 129313
2011-04-11 22:45:02 +00:00
Wesley Peck
6263e05e6d Add scheduling information for the MBlaze backend.
llvm-svn: 129311
2011-04-11 22:31:52 +00:00
Eric Christopher
a7c5e42cbe Lex, and then fail on invalid constants.
Testcase forthcoming.

rdar://8490596

llvm-svn: 129309
2011-04-11 22:24:56 +00:00
Nick Lewycky
75e67d4dc2 Just because a GlobalVariable's initializer is [N x { i32, void ()* }] doesn't
mean that it has to be ConstantArray of ConstantStruct. We might have
ConstantAggregateZero, at either level, so don't crash on that.

Also, semi-deprecate the sentinal value. The linker isn't aware of sentinals so
we end up with the two lists appended, each with their "sentinals" on them.
Different parts of LLVM treated sentinals differently, so make them all just
ignore the single entry and continue on with the rest of the list.

llvm-svn: 129307
2011-04-11 22:11:20 +00:00
Rafael Espindola
a1fb8a36f9 Implement cfi_rel_offset
llvm-svn: 129306
2011-04-11 21:49:50 +00:00
Jakob Stoklund Olesen
7796876061 Speed up eviction by stopping collectInterferingVRegs as soon as the spill
weight limit has been exceeded.

llvm-svn: 129305
2011-04-11 21:47:01 +00:00
Wesley Peck
9481c2d620 Don't crash on invalid instructions when disassembling MBlaze code.
This fixes http://llvm.org/bugs/show_bug.cgi?id=9653

llvm-svn: 129303
2011-04-11 21:35:21 +00:00
Bill Wendling
966775ce8a The default of the dispatch switch statement was to branch to a BB that executed
the 'unwind' instruction. However, later on that instruction was converted into
a jump to the basic block it was located in, causing an infinite loop when we
get there.

It turns out, we get there if the _Unwind_Resume_or_Rethrow call returns (which
it's not supposed to do). It returns if it cannot find a place to unwind
to. Thus we would get what appears to be a "hang" when in reality it's just that
the EH couldn't be propagated further along.

Instead of infinitely looping (or calling `unwind', which none of our back-ends
support (it's lowered into nothing...)), call the @llvm.trap() intrinsic
instead. This may not conform to specific rules of a particular language, but
it's rather better than infinitely looping.

<rdar://problem/9175843&9233582>

llvm-svn: 129302
2011-04-11 21:32:34 +00:00
Johnny Chen
77f484c5df Fix the bug where the immediate shift amount for Thumb logical shift instructions are incorrectly disassembled.
rdar://problem/9266265

llvm-svn: 129298
2011-04-11 21:14:35 +00:00
Evan Cheng
ea0d287a8a Look pass copies when determining whether hoisting would end up inserting more copies. rdar://9266679
llvm-svn: 129297
2011-04-11 21:09:18 +00:00
Rafael Espindola
986ec356fc implement .cfi_adjust_cfa_offset.
llvm-svn: 129296
2011-04-11 20:29:16 +00:00
Owen Anderson
b8c2fc6d09 Fix another using-CPSR-twice bug in my ADCS/SBCS cleanups, and make proper use of the Commutable bit.
llvm-svn: 129294
2011-04-11 20:12:19 +00:00
Jakob Stoklund Olesen
fceaaa54f5 Use a faster algorithm for computing MBB live-in registers after register allocation.
LiveIntervals::findLiveInMBBs has to do a full binary search for each segment.

llvm-svn: 129292
2011-04-11 20:01:41 +00:00
Johnny Chen
77dc5a7187 Trivial comment fix.
llvm-svn: 129288
2011-04-11 18:51:50 +00:00
Evan Cheng
d575a99d75 Fix a couple of places where changes are made but not tracked.
llvm-svn: 129287
2011-04-11 18:47:20 +00:00
Johnny Chen
b07cb8fee1 Check invalid register encodings for LdFrm/StFrm ARM instructions and flag them as
invalid instructions.

llvm-svn: 129286
2011-04-11 18:34:12 +00:00
Kevin Enderby
6e09a5d065 Adding support for printing operands symbolically to llvm's public 'C'
disassembler API.  Hooked this up to the ARM target so such tools as Darwin's
otool(1) can now print things like branch targets for example this:
  blx _puts
instead of this:
  blx #-36
And even print the expression encoded in the Mach-O relocation entried for
things like this:
  movt r0, :upper16:((_foo-_bar)+1234)

llvm-svn: 129284
2011-04-11 18:08:50 +00:00
Jakob Stoklund Olesen
d224a3530a Don't add live ranges for sub-registers when clobbering a physical register.
Both coalescing and register allocation already check aliases for interference,
so these extra segments are only slowing us down.

This speeds up both linear scan and the greedy register allocator.

llvm-svn: 129283
2011-04-11 18:08:10 +00:00
Jakob Stoklund Olesen
57f2eda288 Speed up LiveIntervalUnion::unify by handling end insertion specially.
This particularly helps with the initial transfer of fixed intervals.

llvm-svn: 129277
2011-04-11 15:00:44 +00:00
Jakob Stoklund Olesen
97bb6d4c3a Time the initial seeding of live registers
llvm-svn: 129276
2011-04-11 15:00:42 +00:00
Jakob Stoklund Olesen
5d6e68454e Don't shrink live ranges after dead code elimination unless it is going to help.
In particular, don't repeatedly recompute the PIC base live range after rematerialization.

llvm-svn: 129275
2011-04-11 15:00:39 +00:00
Jay Foad
7717c670bb Fix or remove code which seemed to think that the operand of a Constant
was always a User.

llvm-svn: 129272
2011-04-11 09:48:55 +00:00
Jay Foad
0d5ca4cf44 Don't include Operator.h from InstrTypes.h.
llvm-svn: 129271
2011-04-11 09:35:34 +00:00
Jay Foad
71688dc03e Phi nodes always use an even number of operands, so don't ever allocate
an odd number.

llvm-svn: 129270
2011-04-11 09:25:51 +00:00
Bill Wendling
12f5828e1e Revert r129235 pending a vetting of the EH rewrite.
--- Reverse-merging r129235 into '.':
D    test/Feature/bb_attrs.ll
U    include/llvm/BasicBlock.h
U    include/llvm/Bitcode/LLVMBitCodes.h
U    lib/VMCore/AsmWriter.cpp
U    lib/VMCore/BasicBlock.cpp
U    lib/AsmParser/LLParser.cpp
U    lib/AsmParser/LLLexer.cpp
U    lib/AsmParser/LLToken.h
U    lib/Bitcode/Reader/BitcodeReader.cpp
U    lib/Bitcode/Writer/BitcodeWriter.cpp

llvm-svn: 129259
2011-04-10 23:18:04 +00:00
Nicolas Geoffray
5b427ce48b Bugfix in the Cpp backend after API change on PHINode::Create.
llvm-svn: 129248
2011-04-10 17:39:40 +00:00
Bill Wendling
62d49461b6 Beginning of the Great Exception Handling Rewrite.
* Add a "landing pad" attribute to the BasicBlock.
* Modify the bitcode reader and writer to handle said attribute.

Later: The verifier will ensure that the landing pad attribute is used in the
appropriate manner. I.e., not applied to the entry block, and applied only to
basic blocks that are branched to via a `dispatch' instruction.

(This is a work-in-progress.)

llvm-svn: 129235
2011-04-10 00:04:27 +00:00
Chris Lattner
b9b420d588 fix rdar://8735979 - "int 3" doesn't match to "int3". Unfortunately,
InstAlias doesn't allow matching immediate operands, so we have to write
C++ code to do this.

llvm-svn: 129223
2011-04-09 19:41:05 +00:00
Benjamin Kramer
3af55c1e2e Fix potential buffer overflow on win32.
llvm-svn: 129214
2011-04-09 14:06:12 +00:00
Benjamin Kramer
6f39531981 Don't store Twine temporaries, it's not safe.
And don't append the name over and over again in the loop.

llvm-svn: 129210
2011-04-09 11:26:27 +00:00
Benjamin Kramer
5cf358f270 Make error message more useful.
llvm-svn: 129209
2011-04-09 10:10:35 +00:00
Eli Friedman
f0ba0c54ec Add back a couple checks removed by r129128; the fact that an intitializer
is an array of structures doesn't imply it's a ConstantArray of
ConstantStruct.

llvm-svn: 129207
2011-04-09 09:11:09 +00:00