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

40947 Commits

Author SHA1 Message Date
Dan Gohman
e400c660e4 Fix X86's isLegalAddressingMode to recognize that static addresses
need not be RIP-relative in small mode.

llvm-svn: 111917
2010-08-24 15:55:12 +00:00
Dan Gohman
afd801ac45 Add a comment explaining why this code doesn't just call
ParseMetadataValue.

llvm-svn: 111914
2010-08-24 14:35:45 +00:00
Dan Gohman
979850aeb6 Add a comment explaining why this code is more complex than it
initially seems it should require.

llvm-svn: 111913
2010-08-24 14:31:06 +00:00
Kalle Raiskila
1be8a5f947 Fix SPU BE to use all the available return registers.
llc used to assert on the added testcase.

llvm-svn: 111911
2010-08-24 11:50:48 +00:00
Kalle Raiskila
ef9e592448 Remove some dead code from SPU BE that remained
from 64bit vector support.

llvm-svn: 111910
2010-08-24 11:05:51 +00:00
Owen Anderson
cb599851f2 Don't assume that all constants with integer types are ConstantInts.
llvm-svn: 111906
2010-08-24 07:55:44 +00:00
Dan Gohman
bdfcaac500 Add braces to fix dangling else.
llvm-svn: 111896
2010-08-24 02:40:27 +00:00
Dan Gohman
3c2bff91d0 Extend function-local metadata to be usable as attachments.
llvm-svn: 111895
2010-08-24 02:24:03 +00:00
Dan Gohman
01f40e1fb6 When we know we have an MDValue or MDString, call EnumerateMetadata
directly instead of going through EnumerateValue.

llvm-svn: 111894
2010-08-24 02:10:52 +00:00
Dan Gohman
c68320f6ad Give ParseInstructionMetadata access to the PerFunctionState object.
This is in preparation for generalizing its parsing of function-local
values.

llvm-svn: 111893
2010-08-24 02:05:17 +00:00
Dan Gohman
5b8e9845c4 Simplify this code. NamedMDNode operands are MDNodes.
llvm-svn: 111892
2010-08-24 02:01:24 +00:00
Bruno Cardoso Lopes
7939025262 Use pshufhw and pshuflw in more cases and fix getTargetShuffleNode number of arguments
llvm-svn: 111890
2010-08-24 01:16:15 +00:00
Bill Wendling
c92b4d86ad Add comments for what the condition code symbols mean.
llvm-svn: 111889
2010-08-24 01:11:30 +00:00
Eric Christopher
c2ed70d52b Update comment.
llvm-svn: 111887
2010-08-24 01:10:52 +00:00
Eric Christopher
5f3382bacc Fix the opcode and the operands for the load instruction.
llvm-svn: 111885
2010-08-24 01:10:04 +00:00
Eric Christopher
5d1289db95 Add register class hack that needs to go away, but makes it more obvious
that it needs to go away.  Use loadRegFromStackSlot where possible.

Also, remember to update the value map.

llvm-svn: 111883
2010-08-24 00:50:47 +00:00
Chris Lattner
115fdde871 fix rdar://7997827 - Accept and ignore LL and ULL suffixes on integer literals.
Also fix 0b010 syntax to actually work while we're at it :-)

llvm-svn: 111876
2010-08-24 00:43:25 +00:00
Eric Christopher
696d6ee9d7 Add some more debugging code, make it more obvious that RegOffset is
getting an address for an object and select some default values.

llvm-svn: 111871
2010-08-24 00:07:24 +00:00
Devang Patel
9024c19242 Revert r107202. It is not adding any value.
llvm-svn: 111870
2010-08-24 00:06:12 +00:00
Eric Christopher
a1652c6ea6 Don't need the extra register here.
llvm-svn: 111864
2010-08-23 23:28:04 +00:00
Devang Patel
45a818bea5 Let FE use derived types for DW_TAG_friend.
Patch by Alexander Herz!

llvm-svn: 111861
2010-08-23 23:16:25 +00:00
Eric Christopher
2f01adebca Add some more "get address into register" code and a more TODOs/FIXMEs.
llvm-svn: 111860
2010-08-23 23:14:31 +00:00
Eric Christopher
7ec47db6b2 Add an ARMFunctionInfo member and use it.
llvm-svn: 111854
2010-08-23 22:32:45 +00:00
Dan Gohman
1aabedd6b3 Verify that a non-uniqued non-temporary MDNode is not deleted via
MDNode::deleteTemporary.

llvm-svn: 111853
2010-08-23 22:32:05 +00:00
Eric Christopher
e0d09e27f8 Start getting ARM loads/address computation going.
llvm-svn: 111850
2010-08-23 21:44:12 +00:00
Benjamin Kramer
b08a868783 Fix thinko. Having no tests is great ...
llvm-svn: 111848
2010-08-23 21:32:00 +00:00
Jim Grosbach
33f85d977a Remove the MFI storage of the local allocation block size. It's not needed.
llvm-svn: 111847
2010-08-23 21:29:29 +00:00
Benjamin Kramer
005c0b532e Reduce code duplication.
llvm-svn: 111846
2010-08-23 21:23:52 +00:00
Benjamin Kramer
8961d86d95 ELFObjectWriter: Run ComputeSymbolTable before recording relocations. This way we can use the information it has computed and don't have to recompute the same stuff over and over again.
llvm-svn: 111844
2010-08-23 21:19:37 +00:00
Bruno Cardoso Lopes
ed9ff8d8d0 Start using target speficic nodes for shuffles: pshufhw and pshuflw
llvm-svn: 111837
2010-08-23 20:41:02 +00:00
Jim Grosbach
2bce13a3a4 Better handling of local offsets for downwards growing stacks. This corrects
relative offsets when there are offsets encoded in the instructions and
simplifies final allocation in PEI. rdar://8277890

llvm-svn: 111836
2010-08-23 20:40:38 +00:00
Gabor Greif
6bd4b1cc6c tyops
llvm-svn: 111835
2010-08-23 20:30:51 +00:00
Owen Anderson
9f7621fa94 Turn LVI back off, I have a testcase now.
llvm-svn: 111834
2010-08-23 19:59:27 +00:00
Chris Lattner
f0f35c4aea Add a new llvm.x86.int intrinsic, allowing access to the
x86 int and int3 instructions.  Patch by Peter Housel!

llvm-svn: 111831
2010-08-23 19:39:25 +00:00
Mikhail Glushenkov
741dc5578b Add a TODO.
llvm-svn: 111828
2010-08-23 19:24:12 +00:00
Mikhail Glushenkov
14e2900dfd llvmc: Properly handle (error) in edge properties.
llvm-svn: 111827
2010-08-23 19:24:08 +00:00
Benjamin Kramer
be1f37f512 Add the symbol offset to the relocation value when we relocate against section. By Roman Divacky.
llvm-svn: 111824
2010-08-23 19:05:46 +00:00
Devang Patel
cf6c6b4038 Handle qualified constants that are directly folded by FE.
PR 7920.

llvm-svn: 111820
2010-08-23 18:25:56 +00:00
Benjamin Kramer
c67b87ec44 Use the proper relocation section + cleanup, from Roman Divacky.
llvm-svn: 111819
2010-08-23 18:24:20 +00:00
Benjamin Kramer
926ba6058b Avoid O(n*m) complexity in StringRef::find_first(_not)_of(StringRef).
- Cache used characters in a bitset to reduce memory overhead to just 32 bytes.
- On my core2 this code is faster except when the checked string was very short
  (smaller than the list of delimiters).

llvm-svn: 111817
2010-08-23 18:16:08 +00:00
Owen Anderson
ee69c0112d Re-enable LazyValueInfo. Monitoring for failures.
llvm-svn: 111816
2010-08-23 18:12:23 +00:00
Owen Anderson
fe3d206e65 Now that PassInfo and Pass::ID have been separated, move the rest of the passes over to the new registration API.
llvm-svn: 111815
2010-08-23 17:52:01 +00:00
Chris Lattner
f4dfc7aaab random improvement for variable shift codegen.
llvm-svn: 111813
2010-08-23 17:30:29 +00:00
Chandler Carruth
e0ed6ee921 Fix some GCC warnings by providing a virtual destructor in the base of a class
hierarchy with virtual methods and using llvm_unreachable to properly indicate
unreachable states which would otherwise leave variables uninitialized.

llvm-svn: 111803
2010-08-23 08:25:07 +00:00
Anton Korobeynikov
a68e2a53a1 Revert invalid r111792. Jump tables are not broken on x86-64 / coff,
it's COFF emitter which does not support differences of two symbols
(and needs to be fixed). GAS is pretty fine with code produced.

llvm-svn: 111801
2010-08-23 07:38:51 +00:00
Michael J. Spencer
82f1603fa7 Revert part of my last commit. the mingw32 build bot doesn't seem to like it.
llvm-svn: 111793
2010-08-23 05:25:23 +00:00
Michael J. Spencer
c52ac23659 Workaround broken jump tables on x86-64 COFF.
llvm-svn: 111792
2010-08-23 04:45:37 +00:00
Chris Lattner
299b129955 remove some dead code.
llvm-svn: 111791
2010-08-23 03:12:06 +00:00
Nick Lewycky
c529c1c041 Verify the predicates on icmp/fcmp. Suggested by Jeff Yasskin!
llvm-svn: 111787
2010-08-22 23:45:14 +00:00
Eli Friedman
64c0b96dd3 Delete dead comment.
llvm-svn: 111744
2010-08-21 20:19:51 +00:00
Anton Korobeynikov
c3294e6abe Use rip-rel addressing on win64 by default. For this we just
defaults to small pic code model.

llvm-svn: 111741
2010-08-21 17:21:11 +00:00
Benjamin Kramer
8ae4730ad7 Use MDNode::destroy(). Fixes a delete/free mismatch.
llvm-svn: 111739
2010-08-21 15:07:23 +00:00
Michael J. Spencer
18689045ce MC: Add partial x86-64 support to COFF.
llvm-svn: 111728
2010-08-21 05:58:13 +00:00
Dan Gohman
ad0acc2bf2 Add an assert to MDNode::deleteTemporary check that the node being deleted
is not non-temporary.

llvm-svn: 111713
2010-08-21 02:52:29 +00:00
Dan Gohman
30b8e6cfd2 Fix x86 fast-isel's cmp+branch folding to avoid folding when the
comparison is in a different basic block from the branch. In such
cases, the comparison's operands may not have initialized virtual
registers available.

llvm-svn: 111709
2010-08-21 02:32:36 +00:00
Bruno Cardoso Lopes
1998fbbf1a Prepare LowerVECTOR_SHUFFLEv8i16 to use x86 target specific nodes directly
llvm-svn: 111704
2010-08-21 01:32:18 +00:00
Bruno Cardoso Lopes
28d9071635 This is the first step towards refactoring the x86 vector shuffle code. The
general idea here is to have a group of x86 target specific nodes which are
going to be selected during lowering and then directly matched in isel.

The commit includes the addition of those specific nodes and a *bunch* of
patterns, and incrementally we're going to switch between them and what we
have right now. Both the patterns and target specific nodes can change as
we move forward with this work.

llvm-svn: 111691
2010-08-20 22:55:05 +00:00
Dan Gohman
31ab7e6b8c CreateTemporaryType doesn't needs its Context argument.
llvm-svn: 111687
2010-08-20 22:39:47 +00:00
Bill Wendling
163660135e Create the new linker type "linker_private_weak_def_auto".
It's similar to "linker_private_weak", but it's known that the address of the
object is not taken. For instance, functions that had an inline definition, but
the compiler decided not to inline it. Note, unlike linker_private and
linker_private_weak, linker_private_weak_def_auto may have only default
visibility.  The symbols are removed by the linker from the final linked image
(executable or dynamic library).

llvm-svn: 111684
2010-08-20 22:05:50 +00:00
Dan Gohman
072e7bdcd4 Introduce a new temporary MDNode concept. Temporary MDNodes are
not part of the IR, are not uniqued, and may be safely RAUW'd.
This replaces a variety of alternate mechanisms for achieving
the same effect.

llvm-svn: 111681
2010-08-20 22:02:26 +00:00
Daniel Dunbar
22ad30651b Fix --disable-threads build, PR7949.
llvm-svn: 111676
2010-08-20 20:54:37 +00:00
Jim Grosbach
2a9a42fbb1 Downwards growing stack allocation order reverses relative offsets
llvm-svn: 111673
2010-08-20 20:25:31 +00:00
Jim Grosbach
b96a34d6c7 Add more dbg output
llvm-svn: 111670
2010-08-20 19:04:43 +00:00
Benjamin Kramer
482435cdb0 Update CMake build.
llvm-svn: 111669
2010-08-20 18:56:46 +00:00
Owen Anderson
678fd04aa5 Re-apply r111568 with a fix for the clang self-host.
llvm-svn: 111665
2010-08-20 18:24:43 +00:00
Dan Gohman
730afb791f Delete SlowOperationInformer, which is no longer used.
llvm-svn: 111661
2010-08-20 18:07:37 +00:00
Dan Gohman
1c24df6ecc Convert DbgInfoPrinter to use errs() instead of outs().
llvm-svn: 111659
2010-08-20 18:03:05 +00:00
Jim Grosbach
2ed1a1d58e properly check for whether base regs were inserted
llvm-svn: 111646
2010-08-20 16:48:30 +00:00
Dan Gohman
b316c3de4e Make outs() close its file when its stream is destructed, so that
pending output errors are detected.

llvm-svn: 111643
2010-08-20 16:44:56 +00:00
Dan Gohman
20fe555d22 Delete raw_stdout_ostream and raw_stderr_ostream, which are unused
outside of outs() and errs() themselves, and they don't really
need custom classes.

llvm-svn: 111642
2010-08-20 16:39:41 +00:00
Dan Gohman
4d1241b6b6 Move raw_ostream's Error flag into raw_fd_ostream, as that's the only
class which is using it.

llvm-svn: 111639
2010-08-20 16:34:20 +00:00
Erick Tryzelaar
68c31295f7 Expose LLVMSetOperand and LLVMGetNumOperands to llvm-c and ocaml.
llvm-svn: 111625
2010-08-20 14:51:22 +00:00
Mikhail Glushenkov
63df898925 llvmc: Cut global namespace pollution.
llvm-svn: 111619
2010-08-20 11:24:44 +00:00
Bob Wilson
0039bc228b Replace the arm.neon.vmovls and vmovlu intrinsics with vector sign-extend and
zero-extend operations.

llvm-svn: 111614
2010-08-20 04:54:02 +00:00
Dan Gohman
d88735e805 Introduce a new tool_output_file class, which extends raw_ostream with
functionality that most command-line tools need: ensuring that the
output file gets deleted if the tool is interrupted or encounters an
error.

llvm-svn: 111595
2010-08-20 00:48:10 +00:00
Eric Christopher
e082792357 Fix loop conditionals (MO.isDef() asserts that it's a reg) and
move some constraints around.

llvm-svn: 111594
2010-08-20 00:36:24 +00:00
Eric Christopher
df3a3f5e3e Add a couple of random comments.
llvm-svn: 111592
2010-08-20 00:20:31 +00:00
Bob Wilson
3821009139 If the target says that an extending load is not legal, regardless of whether
it involves specific floating-point types, legalize should expand an
extending load to a non-extending load followed by a separate extend operation.
For example, we currently expand SEXTLOAD to EXTLOAD+SIGN_EXTEND_INREG (and
assert that EXTLOAD should always be supported).  Now we can expand that to
LOAD+SIGN_EXTEND.  This is needed to allow vector SIGN_EXTEND and ZERO_EXTEND
to be used for NEON.

llvm-svn: 111586
2010-08-19 23:52:39 +00:00
Jim Grosbach
4e6f40561f Better handling of offsets on frame index references. rdar://8277890
llvm-svn: 111585
2010-08-19 23:52:25 +00:00
Daniel Dunbar
093ad188e7 CrashRecovery/Darwin: On Darwin, raise sends a signal to the main thread instead
of the current thread. This has the unfortunate effect that assert() and abort()
will end up bypassing our crash recovery attempts. We work around this for
anything in the same linkage unit by just defining our own versions of the
assert handler and abort.

llvm-svn: 111583
2010-08-19 23:45:39 +00:00
Evan Cheng
0710eb55f1 Update debug logs.
llvm-svn: 111575
2010-08-19 23:33:02 +00:00
Evan Cheng
e558c5048c Properly update MachineDominators when splitting critical edge.
llvm-svn: 111574
2010-08-19 23:32:47 +00:00
Owen Anderson
0e57acb623 Revert r111568 to unbreak clang self-host.
llvm-svn: 111571
2010-08-19 23:25:16 +00:00
Owen Anderson
7f2852ba2d When a set of bitmask operations, typically from a bitfield initialization, only modifies the low bytes of a value,
we can narrow the store to only over-write the affected bytes.

llvm-svn: 111568
2010-08-19 22:15:40 +00:00
Owen Anderson
e22f313e44 Disable LVI while I evaluate a failure.
llvm-svn: 111551
2010-08-19 19:47:08 +00:00
Owen Anderson
9de85fb6c0 Tentatively enabled LVI by default. I'll be monitoring for any failures.
llvm-svn: 111543
2010-08-19 19:04:40 +00:00
Bill Wendling
33a73c2744 Correct header.
llvm-svn: 111540
2010-08-19 18:52:17 +00:00
Evan Cheng
44e9a498ac It's possible to sink a def if its local uses are PHI's.
llvm-svn: 111537
2010-08-19 18:33:29 +00:00
Michael J. Spencer
c17025abdc Fix the msvc 2010 build.
The Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01
implements parts of C++0x based on the draft standard. An old version of
the draft had a bug that makes std::pair<T1*, T2*>(something, 0) fail to
compile. This is because the template<class U, class V> pair(U&& x, V&& y)
constructor is selected, even though it later fails to implicitly convert
U and V to frist_type and second_type.

This has been fixed in n3090, but it seems that Microsoft is not going to
update msvc.

llvm-svn: 111535
2010-08-19 18:16:39 +00:00
Dale Johannesen
579b1bef32 Do not assert when reading an exponent out of range.
llvm-svn: 111534
2010-08-19 17:58:35 +00:00
Jim Grosbach
d009b9d0a8 Add Thumb1 support for virtual frame indices.
rdar://8277890

llvm-svn: 111533
2010-08-19 17:52:13 +00:00
Evan Cheng
f34da99d49 Remove disabled assertion.
llvm-svn: 111531
2010-08-19 17:33:48 +00:00
Evan Cheng
2edab9ddea Teach machine-sink to break critical edges when appropriate. Work in progress.
llvm-svn: 111530
2010-08-19 17:33:11 +00:00
Eric Christopher
8f9362166c Silence warning.
llvm-svn: 111518
2010-08-19 15:35:27 +00:00
Benjamin Kramer
574b1a27b1 MCELF: Count the section orders properly. Patch by Roman Divacky.
llvm-svn: 111517
2010-08-19 13:44:49 +00:00
Jim Grosbach
d6e0ffd95b Update local stack block allocation to let PEI do the allocs if no additional
base registers were required. This will allow for slightly better packing
of the locals when alignment padding is necessary after callee saved registers.

llvm-svn: 111508
2010-08-19 02:47:08 +00:00
Dan Gohman
bb27588b3f Revert r111199; it breaks -debug-pass=Structure output.
llvm-svn: 111500
2010-08-19 01:29:07 +00:00
Chris Lattner
355d472093 fix PR7465, mishandling of lcall and ljmp: intersegment long
call and jumps.

llvm-svn: 111496
2010-08-19 01:18:43 +00:00
Dan Gohman
ba5736d2fe Process the step before the start, because it's usually the simpler
of the two.

llvm-svn: 111495
2010-08-19 01:02:31 +00:00
Chris Lattner
b3abfa861f minor progress towards fixing PR7465
llvm-svn: 111494
2010-08-19 01:00:34 +00:00
Eric Christopher
b80df4f04e Add an AddOptionalDefs method and use it.
llvm-svn: 111489
2010-08-19 00:37:05 +00:00
Bill Wendling
fa85185486 Add the "isCompare" attribute to the defm instead of each individual instr.
llvm-svn: 111481
2010-08-19 00:05:48 +00:00
Jakob Stoklund Olesen
f2b0bcb397 Don't call Predicate_* in Mips.
llvm-svn: 111468
2010-08-18 23:56:46 +00:00
Eric Christopher
0749ca13a8 Remove extra header.
llvm-svn: 111456
2010-08-18 23:38:16 +00:00
Jim Grosbach
5d8da556ff Add a newline to debug output
llvm-svn: 111453
2010-08-18 23:14:02 +00:00
Chris Lattner
7663b66c31 refix PR1143 by making basicaa analyze zexts of indices aggresively,
which I broke with a recent patch.

llvm-svn: 111452
2010-08-18 23:09:49 +00:00
Evan Cheng
4690ffd18a If any def of a machine-sink candidate has local uses, it's obviously not safe to sink it to a successor block. This bug has been hidden because a later check for critical-edge disable these illegal optimizations. This patch should significantly reduce the amount of time spent on checking dominator information for obviously unsafe sinking.
llvm-svn: 111450
2010-08-18 23:09:25 +00:00
Chris Lattner
45440e6f6e GetLinearExpression is only called when TD is non-null, pass as
a reference instead of pointer.

llvm-svn: 111445
2010-08-18 22:52:09 +00:00
Chris Lattner
1e05823153 rework GEP decomposition to make a new VariableGEPIndex struct instead of
using a pair.  This tidies up the code a bit.  While setting things up, add
a (currently unused) field to keep track of how the value is extended.

llvm-svn: 111444
2010-08-18 22:47:56 +00:00
Jim Grosbach
6f036da8dc Enable ARM base register reuse to local stack slot allocation. Whenever a new
frame index reference to an object in the local block is seen, check if
it's near enough to any previously allocaated base register to re-use.

rdar://8277890

llvm-svn: 111443
2010-08-18 22:44:49 +00:00
Dan Gohman
95e334dbca Make raw_fd_ostream consider itself the owner of STDOUT_FILENO when
constructed with an output filename of "-". In particular, allow the
file descriptor to be closed, and close the file descriptor in the
destructor if it hasn't been explicitly closed already, to ensure
that any write errors are detected.

llvm-svn: 111436
2010-08-18 22:26:19 +00:00
Chris Lattner
bd80bd5d69 move gep decomposition out of ValueTracking into BasicAA. The form of
decomposition that it is doing is very basicaa specific and is only used
by basicaa.

Now with less tree breakingness.

llvm-svn: 111433
2010-08-18 22:07:29 +00:00
Dan Gohman
b1aa643484 Tidy.
llvm-svn: 111432
2010-08-18 22:04:43 +00:00
Bill Wendling
d4fd98ebda Minor simplification. Gets rid of a needless temporary.
llvm-svn: 111430
2010-08-18 21:32:07 +00:00
Owen Anderson
a57dfdac61 Use ConstantRange to propagate information through value definitions.
llvm-svn: 111425
2010-08-18 21:11:37 +00:00
Jakob Stoklund Olesen
ef87fb790b Thinking about it, we don't need MachineDominatorTree after all. The DomValue
map discovers the iterated dominance frontier for free.

llvm-svn: 111400
2010-08-18 20:29:53 +00:00
Jakob Stoklund Olesen
a94deec1c0 Revert r111394. It was too aggressive.
We must complete the DFS, otherwise we might miss needed phi-defs, and
prematurely color live ranges with a non-dominating value.

This is not a big deal since we get to color more of the CFG and the next
mapValue call will be faster.

llvm-svn: 111397
2010-08-18 20:06:05 +00:00
Jakob Stoklund Olesen
221c0b3c75 Aggressively prune the DFS when inserting phi-defs.
llvm-svn: 111394
2010-08-18 19:00:11 +00:00
Jakob Stoklund Olesen
b6491ab1f6 Add the LiveIntervalMap class. Don't hook it up yet.
LiveIntervalMap maps values from a parent LiveInterval to a child interval that
is a strict subset. It will create phi-def values as needed to preserve the
VNInfo SSA form in the child interval.

This leads to an algorithm very similar to the one in SSAUpdaterImpl.h, but with
enough differences that the code can't be reused:

- We don't need to manipulate PHI instructions.
- LiveIntervals have kills.
- We have MachineDominatorTree.
- We can use df_iterator.

llvm-svn: 111393
2010-08-18 19:00:08 +00:00
Daniel Dunbar
3d68ce9eeb Revert r111375, "move gep decomposition out of ValueTracking into BasicAA. The
form of", it doesn't pass tests.

llvm-svn: 111385
2010-08-18 18:43:08 +00:00
Bill Wendling
a055bae65f Improve whitespace.
llvm-svn: 111384
2010-08-18 18:41:13 +00:00
Bill Wendling
fa83b9853e Marked with ATTRIBUTE_USED so that clang doesn't complain.
llvm-svn: 111383
2010-08-18 18:40:57 +00:00
Owen Anderson
65795241db Inform LazyValueInfo whenever a block is deleted, to avoid dangling pointer issues.
llvm-svn: 111382
2010-08-18 18:39:01 +00:00
Daniel Dunbar
9ced206b3a MC/ELF: Allow null values in virtual sections, ELF doesn't use special
directives for putting contents in .bss, for example.

llvm-svn: 111376
2010-08-18 18:22:37 +00:00
Chris Lattner
2d584f0b0e move gep decomposition out of ValueTracking into BasicAA. The form of
decomposition that it is doing is very basicaa specific and is only used
by basicaa.

llvm-svn: 111375
2010-08-18 18:22:17 +00:00
Jim Grosbach
b517fe948f Add hook for re-using virtual base registers for local stack slot access.
Nothing fancy, just ask the target if any currently available base reg
is in range for the instruction under consideration and use the first one
that is. Placeholder ARM implementation simply returns false for now.

ongoing saga of rdar://8277890

llvm-svn: 111374
2010-08-18 17:57:37 +00:00
Jakob Stoklund Olesen
32dcf0e7a9 Preserve subregs on PHI source operands. Patch by Krister Wombell!
llvm-svn: 111366
2010-08-18 16:09:47 +00:00
Kalle Raiskila
05d3cc2ef8 Fix a bug with insertelement on SPU.
The previous algorithm in LowerVECTOR_SHUFFLE 
didn't check all requirements for "monotonic" shuffles.

llvm-svn: 111361
2010-08-18 10:20:29 +00:00
Kalle Raiskila
8b6f5df4ae Remove all traces of v2[i,f]32 on SPU.
The "half vectors" are now widened to full size by the legalizer.
The only exception is in parameter passing, where half vectors are 
expanded. This causes changes to some dejagnu tests.

llvm-svn: 111360
2010-08-18 10:04:39 +00:00
Kalle Raiskila
0ee13a45c8 Change SPU C calling convention to match that described in
"SPU Application Binary Interface Specification, v1.9" by
IBM. 
Specifically: use r3-r74 to pass parameters and the return value.

llvm-svn: 111358
2010-08-18 09:50:30 +00:00
Chris Lattner
49d0f29752 fix PR7589: In brief:
gep P, (zext x) != gep P, (sext x)

DecomposeGEPExpression was getting this wrong, confusing
basicaa.

llvm-svn: 111352
2010-08-18 04:28:19 +00:00
Chris Lattner
ab876b6ce8 Fix PR7755: knowing something about an inval for a pred
from the LHS should disable reconsidering that pred on the
RHS.  However, knowing something about the pred on the RHS
shouldn't disable subsequent additions on the RHS from
happening.

llvm-svn: 111349
2010-08-18 03:14:36 +00:00
Chris Lattner
4c6e9192d1 fit in 80 cols
llvm-svn: 111348
2010-08-18 03:13:35 +00:00
Chris Lattner
0a9bda3bde remove some dead code.
llvm-svn: 111345
2010-08-18 02:42:11 +00:00
Chris Lattner
d20a060467 remove some dead code.
llvm-svn: 111344
2010-08-18 02:41:56 +00:00
Chris Lattner
f94830f175 remove some code that is dead now that lea's are modeled with segment registers.
llvm-svn: 111343
2010-08-18 02:40:44 +00:00
Chris Lattner
686cddf177 remove dead prototype.
llvm-svn: 111342
2010-08-18 02:37:06 +00:00
Bob Wilson
412be3eea6 Expand ZERO_EXTEND operations for NEON vector types.
Testcase from Nick Lewycky.

llvm-svn: 111341
2010-08-18 01:45:52 +00:00
Dan Gohman
95cda1f1ef Revert r111321. This doesn't fix a problem.
llvm-svn: 111339
2010-08-18 01:34:52 +00:00
Chris Lattner
ba9f26fade stomp some more undefined behavior, PR7775.
llvm-svn: 111337
2010-08-18 00:33:47 +00:00
Chris Lattner
116d5c1431 include config.h to get config params, hopefully unbreaking mingw builder.
llvm-svn: 111325
2010-08-17 23:22:10 +00:00
Chris Lattner
1657977d0d Fix the rest of rdar://8318441 which happens when a raw_fd_ostream
(e.g. errs()) fails in close() due to (e.g.) a broken pipe.  As
previously written, the had_error() flag would get set and then
the raw_ostream dtor would report a fatal error.  There is nothing
the client can do about this and we have no way to report the error,
so just eat it.

llvm-svn: 111321
2010-08-17 23:11:56 +00:00
Chris Lattner
659fd704e8 report_fatal_error can't use errs(), because errs() can call
into report_fatal_error.  Just blast the string to stderr with write(2)
and hope for the best!  Part of rdar://8318441

llvm-svn: 111320
2010-08-17 23:03:53 +00:00
Eric Christopher
08e9f0250a Temporarily revert r110987 as it's causing some miscompares in
vector heavy code.  I'll re-enable when we've tracked down the problem.

llvm-svn: 111318
2010-08-17 22:55:27 +00:00
Dan Gohman
ee89338e37 Tweak IVUsers' concept of "interesting" to exclude add recurrences
where the step value is an induction variable from an outer loop, to
avoid trouble trying to re-expand such expressions. This effectively
hides such expressions from indvars and lsr, which prevents them
from getting into trouble.

llvm-svn: 111317
2010-08-17 22:50:37 +00:00
Jim Grosbach
ff8f931bbf Add materialization of virtual base registers for frame indices allocated into
the local block. Resolve references to those indices to a new base register.
For simplification and testing purposes, a new virtual base register is
allocated for each frame index being resolved. The result is truly horrible,
but correct, code that's good for exercising the new code paths.

Next up is adding thumb1 support, which should be very simple. Following that
will be adding base register re-use and implementing a reasonable ARM
heuristic for when a virtual base register should be generated at all.

llvm-svn: 111315
2010-08-17 22:41:55 +00:00
Daniel Dunbar
e88f283f80 CrashRecovery: Clear the current context on the first crash, to avoid re-entering it if the cleanup code crashes.
llvm-svn: 111309
2010-08-17 22:32:39 +00:00
Daniel Dunbar
b5312b0f26 CrashRecovery: Add CrashRecoveryContext::GetCurrent(), so clients can find the active context from anywhere.
llvm-svn: 111308
2010-08-17 22:32:37 +00:00
Daniel Dunbar
0fc35d7284 CrashRecovery: Make CrashRecoveryContext static methods thread safe.
llvm-svn: 111307
2010-08-17 22:32:34 +00:00
Dale Johannesen
535ca58e85 Make fast scheduler handle asm clobbers correctly.
PR 7882.  Follows suggestion by Amaury Pouly, thanks.

llvm-svn: 111306
2010-08-17 22:17:24 +00:00