1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00
Commit Graph

45777 Commits

Author SHA1 Message Date
Chris Lattner
6d6cf3ff4a fix a cross-block fastisel crash handling overflow intrinsics.
See comment for details.  This fixes rdar://6772169

llvm-svn: 68890
2009-04-12 07:51:14 +00:00
Chris Lattner
d1b365fc66 make UpdateValueMap handle the possiblity that we could be
copying into the right register, avoiding a copy.

llvm-svn: 68889
2009-04-12 07:46:30 +00:00
Chris Lattner
ed355b8551 optimize FastISel::UpdateValueMap to avoid duplicate map lookups,
and make it return the assigned register.

llvm-svn: 68888
2009-04-12 07:45:01 +00:00
Chris Lattner
6a9e77c980 simplify code by using IntrinsicInst.
llvm-svn: 68887
2009-04-12 07:36:01 +00:00
Chris Lattner
da05d37aa1 Add new TargetInstrDesc::hasImplicitUseOfPhysReg and
hasImplicitDefOfPhysReg methods.  Use them to remove a 
look in X86 fast isel.

llvm-svn: 68886
2009-04-12 07:26:51 +00:00
Chris Lattner
f03202e76d add some optimizations for strncpy/strncat and factor some
code.  Patch by Benjamin Kramer!

llvm-svn: 68885
2009-04-12 05:06:39 +00:00
Dan Gohman
ac11c8d30f Revert r68847. It breaks the build on non-Darwin targets, with this message
from the assembler:

Error: unknown pseudo-op: `.debug_inlined'
llvm-svn: 68863
2009-04-11 15:57:04 +00:00
Devang Patel
6f907173e0 Keep track of inlined functions and their locations. This information is collected when nested llvm.dbg.func.start intrinsics are seen. (Right now, inliner removes nested llvm.dbg.func.start intrinisics during inlining.)
Create debug_inlined dwarf section using these information. This info is used by gdb, at least on Darwin, to enable better experience debugging inlined functions. See DwarfWriter.cpp for more information on structure of debug_inlined section.

llvm-svn: 68847
2009-04-11 00:16:47 +00:00
Chris Lattner
42b8e431b6 move a target-specific test into its directory so it isn't run if you
don't configure the ARM target in.

llvm-svn: 68843
2009-04-10 23:58:38 +00:00
Misha Brukman
6cee2e6033 Fixed spelling.
llvm-svn: 68821
2009-04-10 20:48:27 +00:00
Devang Patel
92ff43635b DebugLabelFolder ruthlessly deletes redundant labels. However, sometimes the redundant labels is referenced by debug info somewhere else. This patch provies a way so that dwarf writer can mark labels as used.
llvm-svn: 68813
2009-04-10 18:58:59 +00:00
Bob Wilson
3b4991e76d Clean up a bunch of whitespace issues and fix a comment typo.
No functional changes.

llvm-svn: 68808
2009-04-10 18:48:47 +00:00
Bill Wendling
8e3613d34b Don't install the libLLVMHello.dylib example.
llvm-svn: 68807
2009-04-10 18:48:38 +00:00
Bill Wendling
e619558f13 Add compatibility_version and current_version flags when creating dylibs.
llvm-svn: 68801
2009-04-10 18:20:41 +00:00
Bill Wendling
87577a3498 Don't run "dsymutils" on .a files.
llvm-svn: 68795
2009-04-10 17:45:16 +00:00
Chris Lattner
0577b8e2ef fix two problems with machine sinking:
1. Sinking would crash when the first instruction of a block was
   sunk due to iterator problems.
2. Instructions could be sunk to their current block, causing an
   infinite loop.

This fixes PR3968

llvm-svn: 68787
2009-04-10 16:38:36 +00:00
Dan Gohman
b85fd685f8 Now that register classes have names, include the name in debug output.
llvm-svn: 68786
2009-04-10 15:59:38 +00:00
Chris Lattner
8d5d3eaf95 fix a broken assertion in ilist_iterator, which caused it to crash in the
bad case instead of actually assert.  Bug pointed out by Jakob Stoklund 
Olesen!

llvm-svn: 68785
2009-04-10 15:47:17 +00:00
Chris Lattner
0b8f2eafad fix typo, patch by Shlomi Fish!
llvm-svn: 68784
2009-04-10 15:38:51 +00:00
Sanjiv Gupta
6962a75641 Added code to handle spilling and reloading of FSRs.
llvm-svn: 68783
2009-04-10 15:10:14 +00:00
Rafael Espindola
88986ef511 Don't fold a load if the other operand is a TLS address.
With this we generate

movl    %gs:0, %eax
leal    i@NTPOFF(%eax), %eax

instead of

movl    $i@NTPOFF, %eax
addl    %gs:0, %eax

llvm-svn: 68778
2009-04-10 10:09:34 +00:00
Nick Lewycky
e5b361c13a Cleanup. Remove redundant llvm:: , we don't need them since we're inside
namespace llvm already.

llvm-svn: 68774
2009-04-10 06:54:06 +00:00
Chris Lattner
af0fd068e1 Add a new Type::getPointerTo method, which is shorthand for
llvm::PointerType::get().  Patch by Anders Johnsen!

llvm-svn: 68772
2009-04-10 06:42:02 +00:00
Nick Lewycky
0f4dbe06e7 Add utility function to IRBuilder that takes the difference between two
pointers, taking into account the size of the pointed-to object.
Patch by Jeffrey Yasskin!

llvm-svn: 68768
2009-04-10 05:30:48 +00:00
Nick Lewycky
9c0705186a Regenerate.
llvm-svn: 68767
2009-04-10 05:18:27 +00:00
Chris Lattner
26aee059ba a few fixes to "addrspace(256) is reference offset of GS segment register".
It turns out that there are still several problems with this, will file a bugzilla.

llvm-svn: 68749
2009-04-10 00:16:23 +00:00
Bill Wendling
5d9538852f Pass in the std::string parameter instead of returning it by value.
llvm-svn: 68747
2009-04-10 00:12:49 +00:00
Bill Wendling
ab0a8487ca Constify getter methods.
llvm-svn: 68745
2009-04-10 00:00:25 +00:00
Dan Gohman
8121b3f88d Remove the obsolete SelectionDAG::getNodeValueTypes and simplify
code that uses it by using SelectionDAG::getVTList instead.

llvm-svn: 68744
2009-04-09 23:54:40 +00:00
Dan Gohman
f0aeaae63c Change the NumVTs field from short to int, since there's no
real need for it to be short.

llvm-svn: 68742
2009-04-09 23:53:31 +00:00
Bill Wendling
62c4c8bc44 StringMap<DIE*>::iterator::first() returns a pointer to the first character of
the key. This will cause it to create a new std::string, which isn't
wanted. Instead, pass back the "const char*". Modify the EmitString() method to
take a "const char*".

llvm-svn: 68741
2009-04-09 23:51:31 +00:00
Devang Patel
500dc5157e Silence unused variable warning.
llvm-svn: 68735
2009-04-09 23:45:17 +00:00
Chris Lattner
4c5310e25e ignore register zero in isRegTiedToUseOperand, following the example of
isRegTiedToDefOperand.  Thanks to Bob for pointing this out!

llvm-svn: 68734
2009-04-09 23:33:34 +00:00
Owen Anderson
bd340ca405 Give register alias checking the hash table treatment too.
llvm-svn: 68730
2009-04-09 22:19:30 +00:00
Bill Wendling
e1dd8c815b Use a StringMap instead of std::map for storing std::string->DIE* maps. This
gives a micro speedup in the Dwarf writer.

llvm-svn: 68728
2009-04-09 21:49:15 +00:00
Devang Patel
78fd57741b llvm.dbg.func_start also defines beginning of function scope.
llvm-svn: 68727
2009-04-09 21:42:11 +00:00
Bill Wendling
c2b941b79c Revert r68708. It was causing this failure in the self-hosting buildbot:
llvm[2]: Compiling lto.cpp for Debug build  (PIC)
make[2]: *** No rule to make target `/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/Debug/lib/libLLVMBitWriter.a', needed by `/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/Release/lib/libLTO.dylib'.  Stop.
make[1]: *** [all] Error 1
make: *** [all] Error 1

llvm-svn: 68721
2009-04-09 18:26:57 +00:00
Bob Wilson
c53238dff1 Fix pr3954. The register scavenger asserts for inline assembly with
register destinations that are tied to source operands.  The
TargetInstrDescr::findTiedToSrcOperand method silently fails for inline
assembly.  The existing MachineInstr::isRegReDefinedByTwoAddr was very
close to doing what is needed, so this revision makes a few changes to
that method and also renames it to isRegTiedToUseOperand (for consistency
with the very similar isRegTiedToDefOperand and because it handles both
two-address instructions and inline assembly with tied registers).

llvm-svn: 68714
2009-04-09 17:16:43 +00:00
Sanjiv Gupta
14c26ced49 The way we are trying to figure out banksel immediate operand may yield different results for different type of insns. This will eventually need to be changed but currently let us prevent the crash in cases of incorrect detection of banksel operand.
llvm-svn: 68713
2009-04-09 17:06:24 +00:00
Chris Lattner
301c4f39a0 reg0 references are not real registers. This fixes a crash on the
attached testcase.

llvm-svn: 68712
2009-04-09 16:50:43 +00:00
Misha Brukman
694eb0f18e Make sure to rebuild dependencies for the check' and unittests' targets so
we're not testing out-of-date code.  This also makes "make check" and
"make unittests" work out-of-the box right after the configure step, without
requiring the user to run "make tools-only" or "make libs-only".

Tested on Linux/x86_64 and Darwin/x86.

llvm-svn: 68708
2009-04-09 14:57:00 +00:00
Sanjiv Gupta
daa922501d Arguments to indirect calls were being passed incorrectly. They are not fixed to start after return value.
llvm-svn: 68705
2009-04-09 10:29:32 +00:00
Chris Lattner
e0d0edaf3f Fix code size computation on x86-64, patch by Zoltan Varga!
llvm-svn: 68690
2009-04-09 06:10:51 +00:00
Chris Lattner
c49d128e58 add an accessor method, patch by John McCall!
llvm-svn: 68684
2009-04-09 05:56:58 +00:00
Sanjiv Gupta
3baf157321 r68576 unconverd a bug in PIC16 port (Thanks to Dan Gohman) where we were custom lowering an ADD to ADDC.
llvm-svn: 68671
2009-04-09 04:03:43 +00:00
Dan Gohman
68de98eef3 Generalize ExtendUsesToFormExtLoad to be usable for ANY_EXTEND,
in addition to ZERO_EXTEND and SIGN_EXTEND. Fix a bug in the
way it checked for live-out values, and simplify the way it
find users by using SDNode::use_iterator's (relatively) new
features. Also, make it slightly more permissive on targets
with free truncates.

In SelectionDAGBuild, avoid creating ANY_EXTEND nodes that are
larger than necessary. If the target's SwitchAmountTy has
enough bits, use it. This exposes the truncate to optimization
early, enabling more optimizations.

llvm-svn: 68670
2009-04-09 03:51:29 +00:00
Owen Anderson
d4ce32ccae Convert TargetRegisterInfo's super-register checking to use a pre-computed hash table just like subregister checking does.
llvm-svn: 68669
2009-04-09 03:50:16 +00:00
Nick Lewycky
c7edd80c95 Fix pointer casting problem.
llvm-svn: 68668
2009-04-09 03:10:03 +00:00
Dan Gohman
6479d0cbb7 Don't copy the operand of a SwitchInst into virtual registers as
eagerly. This helps avoid CopyToReg nodes in some cases where they
aren't needed, and also helps subsequent optimizer heuristics
in cases where the extra nodes would cause the node to appear
to have multiple results. This doesn't have a significant impact
currently; it'll help an upcoming change.

llvm-svn: 68667
2009-04-09 02:33:36 +00:00
Dan Gohman
6cb1387261 Fix grammaros in comments.
llvm-svn: 68666
2009-04-09 02:06:09 +00:00