1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-26 22:42:46 +02:00
Commit Graph

60450 Commits

Author SHA1 Message Date
Daniel Dunbar
648d1ae783 MC/X86: Add "support" for matching ATT style mnemonic prefixes.
- The idea is that when a match fails, we just try to match each of +'b', +'w',
   +'l'. If exactly one matches, we assume this is a mnemonic prefix and accept
   it. If all match, we assume it is width generic, and take the 'l' form.

 - This would be a horrible hack, if it weren't so simple. Therefore it is an
   elegant solution! Chris gets the credit for this particular elegant
   solution. :)

 - Next step to making this more robust is to have the X86 matcher generate the
   mnemonic prefix information. Ideally we would also compute up-front exactly
   which mnemonic to attempt to match, but this may require more custom code in
   the matcher than is really worth it.

llvm-svn: 103012
2010-05-04 16:12:42 +00:00
Duncan Sands
5f1c52fa06 Fix a problem exposed by my previous commit and noticed by a release-asserts
buildbot: the debugging and non-debugging versions of getFunction were not
functionally equivalent: the non-debugging version wrongly assumed that if a
metadata operand was not metadata, then it had a non-null containing function.
This is not true, since the operand might be a global value, constant etc.

llvm-svn: 103008
2010-05-04 14:25:42 +00:00
Duncan Sands
a3857d3d9a Fix a variant of PR6112 found by thinking about it: when doing
RAUW of a global variable with a local variable in function F,
if function local metadata M in function G was using the global
then M would become function-local to both F and G, which is not
allowed.  See the testcase for an example.  Fixed by detecting
this situation and zapping the metadata operand when it occurs.

llvm-svn: 103007
2010-05-04 12:43:36 +00:00
Gabor Greif
53be8efd62 fix operand indexes when outputting InvokeInsts
llvm-svn: 103003
2010-05-04 09:23:54 +00:00
Devang Patel
ee7c7143dc Set DW_AT_APPLE_omit_frame_ptr in endFunction() where MachineFunction is available all the time.
llvm-svn: 103001
2010-05-04 06:15:30 +00:00
Dan Gohman
5c61a913b2 Use the SCEVAddRecExpr::getPostIncExpr utility function instead
of doing the same thing manually.

llvm-svn: 102997
2010-05-04 01:12:27 +00:00
Dan Gohman
4e1dbacdf8 Fix a copy+pasto.
llvm-svn: 102996
2010-05-04 01:11:15 +00:00
Devang Patel
edbef722d6 Do not ignore debug loc attached with llvm.dbg.declare while collecting debug info used by a module.
llvm-svn: 102995
2010-05-04 01:05:02 +00:00
Evan Cheng
66ef3ff9c7 Instruction selection optimizations may have moved the def of a function argument out of the entry block. rdar://7937489
llvm-svn: 102993
2010-05-04 00:58:39 +00:00
Kevin Enderby
f34574dd89 Fix to r102952. The MOV64toSDrm record in X86Instr64bit.td needed the opcode
changed to 0x7E from 0x6E as well as the previous change of RPDI to S3SI.

llvm-svn: 102991
2010-05-04 00:42:46 +00:00
Daniel Dunbar
711d2427dd MC/Matcher: Add support for over-riding the default MatchInstruction function
name (for example, to allow targets to interpose the actual MatchInstruction
function).

llvm-svn: 102987
2010-05-04 00:33:13 +00:00
Daniel Dunbar
b7e0c07d88 llvm-mc: Fix case were we would skip a line in the .s file after an instruction
match failure.

Also, fixes a few memory leak FIXMEs.

llvm-svn: 102986
2010-05-04 00:33:07 +00:00
Evan Cheng
f7b5c86a0b Teach scheduler about REG_SEQUENCE.
llvm-svn: 102984
2010-05-04 00:22:40 +00:00
Dan Gohman
cc176c4b1f Add a polygen rule that reflects the fact that nsw and nuw can be
used together in either order.

llvm-svn: 102983
2010-05-04 00:13:24 +00:00
Dan Gohman
50b08bfbc8 Re-enable isel kill flags, now that the local allocator is ignoring them.
llvm-svn: 102981
2010-05-04 00:12:15 +00:00
Jim Grosbach
1c5f6c5a1b rdar://7937137 - dbg values not being handled in thumb1 version of
eliminateFrameIndex(), leading to llvm_unreachable() assertion failure.

llvm-svn: 102980
2010-05-04 00:11:37 +00:00
Dan Gohman
0f6577e194 Update one more 2.7 to 2.8.
llvm-svn: 102978
2010-05-03 23:52:21 +00:00
Dan Gohman
43994b8cf0 Minimally update ReleaseNotes.html for 2.8 development; uncomment and
update the big red warning at the top. Most of the old content remains
and awaits revision.

Clear out the API changes section, and start it up again with a
mention of the add->fadd transition.

llvm-svn: 102977
2010-05-03 23:51:05 +00:00
Jakob Stoklund Olesen
4ef97cf59c Remove preexisting kill flags in RegAllocLocal, just like LiveVariables does.
This should make it possible to start producing kill flags in isel without
breaking stuff.

llvm-svn: 102976
2010-05-03 23:49:20 +00:00
Dan Gohman
8bfd5f99b5 Factor out FastISel's code for materializing constants and other values
in registers into a separate function to de-couple it from the
top-down-specific logic in getRegForValue.

llvm-svn: 102975
2010-05-03 23:36:34 +00:00
Dale Johannesen
b10ca6bf4c Implement builtin_return_address(x) and builtin_frame_address(x)
on PPC for x!=0.  7624113.

llvm-svn: 102972
2010-05-03 22:59:34 +00:00
Dan Gohman
b8016872b6 Remove the API compatibility layer which converted add, sub, and mul
to fadd, fsub, and fmul, when used with a floating-point type. LLVM
has supported the new instructions since 2.6, so it's time to get
on board.

llvm-svn: 102971
2010-05-03 22:44:19 +00:00
Jakob Stoklund Olesen
51ab2653d5 Check that subregisters don't have independent values in RemoveCopyByCommutingDef().
This fixes PR6941.

llvm-svn: 102970
2010-05-03 22:40:32 +00:00
Dan Gohman
c024fd43c9 Fix tests to use fadd, fsub, and fmul, instead of add, sub, and mul,
when the type is floating-point.

llvm-svn: 102969
2010-05-03 22:36:46 +00:00
Eric Christopher
cbbb35694f Reword a comment slightly.
llvm-svn: 102966
2010-05-03 22:18:49 +00:00
Dan Gohman
2f27d59870 Use getConstant instead of getIntegerSCEV. The two are basically the
same, now that getConstant has overloads consistent with ConstantInt::get.

llvm-svn: 102965
2010-05-03 22:09:21 +00:00
Bill Wendling
80159b87ea Revert r102948.
llvm-svn: 102964
2010-05-03 21:51:21 +00:00
Bob Wilson
5010005c87 Remove special case for llvmCore_Embedded project. This is no longer needed
since llvmCore is built as part of llvmgcc42 now.

llvm-svn: 102962
2010-05-03 21:41:24 +00:00
Bob Wilson
9c9622768e Print basic block numbers in live interval debug output. Since the rest of the
debug output is showing machine instructions, the IR-level basic block names
aren't very meaningful, and because multiple machine basic blocks may be
derived from one IR-level BB, they're also not unique.

llvm-svn: 102960
2010-05-03 21:38:11 +00:00
Nick Lewycky
e92cfd5ebc Fix function prototype mismatch in LLVMUnionType(). Fixes PR7019.
llvm-svn: 102959
2010-05-03 21:36:51 +00:00
Kevin Enderby
ce7a24a57f Changed llvm-mc to use the same suffixes with floating point compare
instructions as the Mac OS X darwin assembler.  Some of which like 'fcoml'
assembled to different opcodes.  While some of the suffixes were just different.

llvm-svn: 102958
2010-05-03 21:31:40 +00:00
Kevin Enderby
be2804f752 Fixed the encoding of two of the X86 movq instuctions. The Move quadword from
mm to mm/m64 and the Move quadword from xmm2/mem64 to xmm1 had the incorrect
encodings.

llvm-svn: 102952
2010-05-03 21:03:31 +00:00
Kevin Enderby
c1eeb061e7 Fixed the encoding of the x86 push instructions. Using a 32-bit immediate value
caused the a pushl instruction to be incorrectly encoding using only two bytes
of immediate, causing the following 2 instruction bytes to be part of the 32-bit
immediate value.  Also fixed the one byte form of push to be used when the
immediate would fit in a signed extended byte.  Lastly changed the names to not
include the 32 of PUSH32 since they actually push the size of the stack pointer.

llvm-svn: 102951
2010-05-03 20:45:05 +00:00
Bill Wendling
61fab275c0 Testcase for r102947.
llvm-svn: 102948
2010-05-03 20:39:35 +00:00
Dan Gohman
66c6519877 Silence warnings about -1 being converted to an unsigned value.
Also, pass true for isSigned even when creating constants for unsigned
comparisons, because the point is to create an all-ones constant,
rather than UINT64_MAX, even for integers wider than 64 bits.

llvm-svn: 102946
2010-05-03 20:23:47 +00:00
Eric Christopher
3496e7c880 Add an option, defaulting to off, to disable the sse domain crossing opts.
llvm-svn: 102941
2010-05-03 19:54:02 +00:00
Devang Patel
fa560fdfc1 Check for side effects before splitting loop.
Patch by Jakub Staszak!

llvm-svn: 102928
2010-05-03 18:06:58 +00:00
Dan Gohman
51faf74c7d Use isTrueWhenEqual and isFalseWhenEqual instead of assuming that
SimplifyICmpOperands will simplify such cases to EQ or NE. This makes
the correcntess of the code independent on SimplifyICmpOperands doing
certain simplifications.

llvm-svn: 102927
2010-05-03 18:00:24 +00:00
Dan Gohman
b4fdc7ea81 In ScalarEvolution::print, don't bother printing out the SCEVs for
comparison instructions, since they aren't interesting, despite having
integer result types.

llvm-svn: 102925
2010-05-03 17:03:23 +00:00
Dan Gohman
043875bc90 In SimplifyICmpOperands, avoid needlessly swapping the operands in the
case where both are addrecs in unrelated loops.

llvm-svn: 102924
2010-05-03 17:00:11 +00:00
Dan Gohman
02c26ed601 Factor out the new <= and >= analysis code into SimplifyICmpOperands.
llvm-svn: 102922
2010-05-03 16:35:17 +00:00
Dan Gohman
85561664d5 Update this comment to note its relationship with the "happens-before"
concept in the proposed memory model changes.

llvm-svn: 102911
2010-05-03 14:59:34 +00:00
Dan Gohman
62ea5f981d Delete this comment. The behavior of struct loads and stores with
respect to padding bytes isn't something that the dependence text
needs to spell out.

llvm-svn: 102910
2010-05-03 14:58:14 +00:00
Dan Gohman
cb5781826c Describe invoke instruction dependencies. Generalize the text for
terminator instructions so that it applies to all terminators with
multiple successors, including invoke.

llvm-svn: 102909
2010-05-03 14:55:22 +00:00
Dan Gohman
55e93b2802 Say "operations" instead of "instructions", as nsw can be applied to
constant expressions as well as instructions.

llvm-svn: 102908
2010-05-03 14:51:43 +00:00
Dan Gohman
15cb983f55 Fix a bug which prevented tail merging of return instructions in
beneficial cases. See the changes in test/CodeGen/X86/tail-opts.ll and
test/CodeGen/ARM/ifcvt2.ll for details.

The fix is to change HashEndOfMBB to hash at most one instruction,
instead of trying to apply heuristics about when it will be profitable to
consider more than one instruction. The regular tail-merging heuristics
are already prepared to handle the same cases, and they're more precise.

Also, make test/CodeGen/ARM/ifcvt5.ll and
test/CodeGen/Thumb2/thumb2-branch.ll slightly more complex so that they
continue to test what they're intended to test.

And, this eliminates the problem in
test/CodeGen/Thumb2/2009-10-15-ITBlockBranch.ll, the testcase from
PR5204. Update it accordingly.

llvm-svn: 102907
2010-05-03 14:35:47 +00:00
Dan Gohman
4f9dc00cec Add a README entry.
llvm-svn: 102906
2010-05-03 14:31:00 +00:00
Duncan Sands
153ad3b903 Remove the -enable-sjlj-eh option, which doesn't do anything.
Remove the -enable-eh option which is only used by the JIT,
and replace it with -jit-enable-eh.

llvm-svn: 102865
2010-05-02 15:36:26 +00:00
Chris Lattner
1452a149f0 fix some inconsistent line endings, patch by Jakub Staszak!
llvm-svn: 102852
2010-05-01 17:36:49 +00:00
Chris Lattner
afaee8e110 revert r102831. We already delete dead readonly calls in
other places, killing a valid transformation is not the right
answer.

llvm-svn: 102850
2010-05-01 17:19:38 +00:00