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

47089 Commits

Author SHA1 Message Date
Dan Gohman
0b9e2dc359 Use Type::isIntOrIntVector and Type::isFPOrFPVector.
llvm-svn: 73433
2009-06-15 22:25:12 +00:00
Dan Gohman
2e737ac21f Support vector casts in more places, fixing a variety of assertion
failures.

To support this, add some utility functions to Type to help support
vector/scalar-independent code. Change ConstantInt::get and
ConstantFP::get to support vector types, and add an overload to
ConstantInt::get that uses a static IntegerType type, for
convenience.

Introduce a new getConstant method for ScalarEvolution, to simplify
common use cases.

llvm-svn: 73431
2009-06-15 22:12:54 +00:00
Anton Korobeynikov
536048774c Address more comments :)
llvm-svn: 73430
2009-06-15 22:08:48 +00:00
Dan Gohman
1fdd9a7c08 Fix a typo in a diagnostic.
llvm-svn: 73429
2009-06-15 21:52:11 +00:00
Anton Korobeynikov
2670a363da Rename methods for the sake of consistency.
llvm-svn: 73428
2009-06-15 21:46:20 +00:00
Anton Korobeynikov
f734bdb5df Document ABIType enum. Patch by Sandeep Patel!
llvm-svn: 73427
2009-06-15 21:46:02 +00:00
Devang Patel
1fb2606b12 Gracefully handle imbalanced inline function begin and end markers.
llvm-svn: 73426
2009-06-15 21:45:50 +00:00
Evan Cheng
4b77794613 ifcvt should ignore cfg where true and false successors are the same.
llvm-svn: 73423
2009-06-15 21:24:34 +00:00
Evan Cheng
c007d30aad Typo.
llvm-svn: 73422
2009-06-15 21:18:20 +00:00
Dan Gohman
22c89d779b Rewrite the noredzone description, attempting to avoid confusing language.
llvm-svn: 73421
2009-06-15 21:18:01 +00:00
Bill Wendling
43f2a61c26 The Ls and Qs were mixed up. Patch by Sean.
llvm-svn: 73417
2009-06-15 20:59:31 +00:00
Dale Johannesen
2d0be306fb Fix the crash in this test. This is basically the same
problem addressed in 31284, but the patch there only
addressed the case where an invoke is the first thing in
a block.

llvm-svn: 73416
2009-06-15 20:59:27 +00:00
Evan Cheng
659d2536b8 Do not form ldrd / strd if the two dests / srcs are the same. Code clean up.
llvm-svn: 73413
2009-06-15 20:54:56 +00:00
Owen Anderson
9a8f02a7d5 Merge PartialInliner changes.
llvm-svn: 73412
2009-06-15 20:50:26 +00:00
Bill Wendling
8b64cfd877 "The Intel instruction tables should include the 64-bit and 32-bit instructions
that push immediate operands of 1, 2, and 4 bytes (extended to the native
register size in each case).  The assembly mnemonics are "pushl" and "pushq."
One such instruction appears at the beginning of the "start" function , so this
is essential for accurate disassembly when unwinding."

Patch by Sean Callanan!

llvm-svn: 73407
2009-06-15 19:39:04 +00:00
Evan Cheng
9c5f793659 Silence a warning.
llvm-svn: 73406
2009-06-15 19:36:32 +00:00
Bill Wendling
a0a5984345 This test is failing. Revert for now.
llvm-svn: 73404
2009-06-15 19:10:56 +00:00
Dan Gohman
deff76f526 Code cleanups. getSCEVAtScope no longer uses SCEVCouldNotCompute.
llvm-svn: 73401
2009-06-15 18:38:59 +00:00
Bill Wendling
1ea00229de Add another testcase for r71478.
llvm-svn: 73399
2009-06-15 18:36:34 +00:00
Dan Gohman
59c4088e16 Make the EnableLoadPRE variable static.
llvm-svn: 73398
2009-06-15 18:30:15 +00:00
Dan Gohman
711f57040d Fix a typo.
llvm-svn: 73397
2009-06-15 18:22:49 +00:00
Dan Gohman
d0637707c5 glibc has two versions of strerror_r, a standards compliant one and a GNU
specific one. The GNU one is chosen when _GNU_SOURCE is defined. g++ always
defines _GNU_SOURCE on linux platforms because glibc's headers won't compile
in C++ mode without it. The GNU strerror_r doesn't always modify the buffer
which causes empty error messages on linux.

This patch changes MakeErrMsg to use the return value of strerror_r to get
the string instead of assuming the buffer will be modified, on GLIBC.

Patch by Benjamin Kramer!

llvm-svn: 73396
2009-06-15 18:05:46 +00:00
Dan Gohman
daf11a4a54 Reword the description of the noredzone attribute.
llvm-svn: 73394
2009-06-15 17:37:09 +00:00
Arnold Schwaighofer
6b340f9247 CheckTailCallReturnConstraints is missing a check on the
incomming chain of the RETURN node. The incomming chain must
be the outgoing chain of the CALL node. This causes the
backend to identify tail calls that are not tail calls. This
patch fixes this.

llvm-svn: 73387
2009-06-15 14:43:36 +00:00
Torok Edwin
236a5272f3 x86_64 was completely missing from the target triples supported by the X86 code
generator!

llvm-svn: 73385
2009-06-15 12:17:44 +00:00
Rafael Espindola
904e6801af Remove the gcc= option. llvm-gcc uses only as=
Look for as in the path. Doing it here instead
of llvm-gcc because llvm-gcc has nothing as
convenient as sys::Program::FindProgramByName.

llvm-svn: 73383
2009-06-15 10:14:18 +00:00
Evan Cheng
3219c7fbe5 Part 1.
- Change register allocation hint to a pair of unsigned integers. The hint type is zero (which means prefer the register specified as second part of the pair) or entirely target dependent.
- Allow targets to specify alternative register allocation orders based on allocation hint.

Part 2.
- Use the register allocation hint system to implement more aggressive load / store multiple formation.
- Aggressively form LDRD / STRD. These are formed *before* register allocation. It has to be done this way to shorten live interval of base and offset registers. e.g.
v1025 = LDR v1024, 0
v1026 = LDR v1024, 0
=>
v1025,v1026 = LDRD v1024, 0

If this transformation isn't done before allocation, v1024 will overlap v1025 which means it more difficult to allocate a register pair.

- Even with the register allocation hint, it may not be possible to get the desired allocation. In that case, the post-allocation load / store multiple pass must fix the ldrd / strd instructions. They can either become ldm / stm instructions or back to a pair of ldr / str instructions.

This is work in progress, not yet enabled.

llvm-svn: 73381
2009-06-15 08:28:29 +00:00
Chris Lattner
52510b0788 fix testcase to properly check for the patch in r73195.
llvm-svn: 73380
2009-06-15 05:46:02 +00:00
Chris Lattner
9e81498d2d "This patch implements the method with the GetModuleFileName function for windows."
Patch by Benjamin Kramer!

llvm-svn: 73379
2009-06-15 05:38:04 +00:00
Chris Lattner
04717d5e84 remove extraneous const qualifier
llvm-svn: 73373
2009-06-15 04:42:32 +00:00
Chris Lattner
eb664fc504 I got J and K backward, many thanks to Eli for spotting this!
llvm-svn: 73372
2009-06-15 04:39:05 +00:00
Chris Lattner
1970e7ad34 remove some old CVS-specific arguments that don't work with SVN.
llvm-svn: 73369
2009-06-15 04:18:54 +00:00
Chris Lattner
dfaaf63aff add a new static method to portably determine whether a patch is
absolute or not, based on a patch by Gregory Curfman!

llvm-svn: 73368
2009-06-15 04:17:07 +00:00
Chris Lattner
e427a956ca implement support for the 'K' asm constraint, PR4347
llvm-svn: 73366
2009-06-15 04:01:39 +00:00
Dan Gohman
111f127d23 Fix old-style type names in comments.
llvm-svn: 73362
2009-06-14 23:30:43 +00:00
Dan Gohman
d3a8d79c0d Implement more aggressive folding of add operand lists when
they contain multiplications of constants with add operations.
This helps simplify several kinds of things; in particular it
helps simplify expressions like ((-1 * (%a + %b)) + %a) to %b,
as expressions like this often come up in loop trip count
computations.

llvm-svn: 73361
2009-06-14 22:58:51 +00:00
Dan Gohman
dda7e316db Specialize DenseMapInfo for SCEVHandle, so that SCEVHandles can be
used as keys in DenseMaps.

llvm-svn: 73360
2009-06-14 22:55:07 +00:00
Dan Gohman
bee566c1ce Check for the short-circuiting condition before performing
the potentially expensive erase.

llvm-svn: 73359
2009-06-14 22:53:57 +00:00
Dan Gohman
d1c7be715c Do compare constant SCEV values in SCEVComplexityCompare, because
even though the order doesn't matter at the top level of an expression,
it does matter when the constant is a subexpression of an n-ary
expression, because n-ary expressions are sorted lexicographically.

llvm-svn: 73358
2009-06-14 22:51:25 +00:00
Dan Gohman
d895ed43c8 Convert several parts of the ScalarEvolution framework to use
SmallVector instead of std::vector.

llvm-svn: 73357
2009-06-14 22:47:23 +00:00
Dan Gohman
973025e678 Add another item to the list of things that indvars does.
llvm-svn: 73355
2009-06-14 22:38:41 +00:00
Duncan Sands
3a4ae072d0 Testcase for PR4332.
llvm-svn: 73353
2009-06-14 22:22:42 +00:00
Evan Cheng
1607bd1fa9 Move register allocation preference (or hint) from LiveInterval to MachineRegisterInfo. This allows more passes to set them.
llvm-svn: 73346
2009-06-14 20:22:55 +00:00
Torok Edwin
6240e2ef53 Fix CMake build. Patch from Ingmar Vanhassel.
llvm-svn: 73342
2009-06-14 13:39:56 +00:00
Owen Anderson
6aa3d83630 Add an early implementation of a partial inlining pass. The idea behind this
is that, for functions whose bodies are entirely guarded by an if-statement, it
can be profitable to pull the test out of the callee and into the caller.

This code has had some cursory testing, but still has a number of known issues
on the LLVM test suite.

llvm-svn: 73338
2009-06-14 08:26:32 +00:00
Bruno Cardoso Lopes
d73d79eaf9 Introduce new BinaryObject (blob) class, ELF Writer modified to use it. BinaryObject.h by Aaron Gray
llvm-svn: 73333
2009-06-14 07:53:21 +00:00
Douglas Gregor
28685e02db Add output of the SFINAE bit for Clang's diagnostics
llvm-svn: 73331
2009-06-14 07:24:49 +00:00
Shantonu Sen
622f9b3511 Add myself, test commit
llvm-svn: 73320
2009-06-14 02:03:17 +00:00
Nick Lewycky
e74c3c6d46 Unlike the other instructions, GEP really does need to look at the type of a
pointer. This fixes kimwitu++. Pointed out by Frits van Bommel on review!

llvm-svn: 73299
2009-06-13 19:09:52 +00:00
Sanjiv Gupta
693a8c54e4 The subprogram descriptor for a function may be missing (llvm-ld linking two static functions with same name), so pick up the compilation unit for the function from the first valid debug loc of its instructions.
This patch also emits debug info for structure (aggregate types in 
general) types.

llvm-svn: 73295
2009-06-13 17:35:54 +00:00