1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00
Commit Graph

46455 Commits

Author SHA1 Message Date
Mike Stump
6ee41e64c8 Add DW_AT_APPLE_isa and DW_AT_APPLE_block. Radar 6867696
llvm-svn: 71479
2009-05-11 21:58:01 +00:00
Dale Johannesen
dd32623987 Fix PR4188. TailMerging can't tolerate inexact
sucessor info.

llvm-svn: 71478
2009-05-11 21:54:13 +00:00
Evan Cheng
645351d3a8 Apply patch review feedback.
llvm-svn: 71472
2009-05-11 20:53:52 +00:00
Jay Foad
2842dd918b Don't #include DerivedTypes.h from TargetData.h.
llvm-svn: 71468
2009-05-11 19:38:09 +00:00
Dan Gohman
e00e346c08 Add a comment about the special meaning of VoidTy in this context.
llvm-svn: 71466
2009-05-11 19:11:53 +00:00
Dan Gohman
2060db5db5 Fix two wording errors that Duncan spotted.
llvm-svn: 71459
2009-05-11 18:51:16 +00:00
Dan Gohman
25ab4c185c Make this grep line a little more specific so that it doesn't
accidentally match something unrelated.

llvm-svn: 71458
2009-05-11 18:49:56 +00:00
Evan Cheng
dad97e1bfc Unbreak non-debug build.
llvm-svn: 71457
2009-05-11 18:40:52 +00:00
Evan Cheng
7c7809eebd Eliminate a compiler warning.
llvm-svn: 71456
2009-05-11 18:40:35 +00:00
Dan Gohman
dfa39efe6d When scalarizing a vector BITCAST, check whether the operand has vector
type, rather than assume that it does. If the operand is not vector, it
shouldn't be run through ScalarizeVectorOp. This fixes one of the
testcases in PR3886.

llvm-svn: 71453
2009-05-11 18:30:42 +00:00
Dan Gohman
361dcef406 LLVM has unaligned loads and stores now.
llvm-svn: 71449
2009-05-11 18:06:05 +00:00
Douglas Gregor
26745696ef Add terminal width detection to llvm::sys::Process. This is needed to
fix Clang PRs 4148 and 4183.

llvm-svn: 71448
2009-05-11 18:05:52 +00:00
Dan Gohman
d365c7a5a3 Upgrade this example to new-style syntax.
llvm-svn: 71447
2009-05-11 18:04:52 +00:00
Dan Gohman
0edabc8a6f Convert a subtract into a negate and an add when it helps x86
address folding.

llvm-svn: 71446
2009-05-11 18:02:53 +00:00
Chris Lattner
f5f153394d remove some done things: we have nocapture and SROA is smarter.
llvm-svn: 71443
2009-05-11 17:41:40 +00:00
Chris Lattner
d50058b0c0 add a note
llvm-svn: 71442
2009-05-11 17:36:33 +00:00
Dale Johannesen
f86e34065b Reverse a loop that is counting up to a maximum to
count down to 0 instead, under very restricted
circumstances.  Adjust 4 testcases in which this
optimization fires.

llvm-svn: 71439
2009-05-11 17:15:42 +00:00
John Mosby
366006cfd3 Shrink wrapping in PEI:
- reduces _static_ callee saved register spills
  and restores similar to Chow's original algorithm.
- iterative implementation with simple heuristic
  limits to mitigate compile time impact.
- handles placing spills/restores for multi-entry,
  multi-exit regions in the Machine CFG without
  splitting edges.
- passes test-suite in LLCBETA mode.

Added contains() method to ADT/SparseBitVector.

llvm-svn: 71438
2009-05-11 17:04:19 +00:00
Jay Foad
5827394cd0 Don't generate redundant casts of constant values when lowering calls to
memcpy, memmove and memset.

llvm-svn: 71427
2009-05-11 11:32:25 +00:00
Jay Foad
d8149f17c2 Change TargetData::getIntPtrType() to return an IntegerType instead of
just a Type.

llvm-svn: 71426
2009-05-11 11:13:47 +00:00
Sanjiv Gupta
264cfd0017 Fix more naming issues.
compiler libcalls start with .lib. now.
fixed section names.

llvm-svn: 71424
2009-05-11 08:52:04 +00:00
Sanjiv Gupta
0506627b14 Detect calls to compiler intrinsics and emit an extern declarations
only for those. These extern declarations to intrinsics are currently 
being emitted at the bottom of generated .s file, which works fine with
gpasm(not sure about MPSAM though).
PIC16 linker generates errors for few cases (function-args/struct_args_5) if you do not include any
extern declarations (even if no intrinsics are being used), but that
needs to be fixed in the linker itself.

llvm-svn: 71423
2009-05-11 06:01:38 +00:00
Bill Wendling
eb4b041ea1 Needed #includes. Thanks Fritz van Bommel!
llvm-svn: 71413
2009-05-10 23:27:41 +00:00
Bill Wendling
e0a4e2af03 This is a large rewrite of how Dwarf info for inlined functions is handled.
The DwarfWriter expects DbgScopes and DIEs to behave themselves according to
DwarfWriter's rules. However, inlined functions violate these rules. There are
two different types of DIEs associated with an inlined function: an abstract
instance, which has information about the original source code for the function
being inlined; and concrete instances, which are created for each place the
function was inlined and point back to the abstract instance.

This patch tries to stay true to this schema. It bypasses how regular DbgScopes
and DIEs are created and used when necessary. It provides special handling for
DIEs of abstract and concrete instances.

This doesn't take care of all of the problems with debug info for inlined
functions, but it's a step in the right direction. For one thing, llvm-gcc
generates wrong IR (it's missing some llvm.dbg intrinsics at the point where the
function's inlined) for this example:

#include <stdio.h>
static __inline__ __attribute__((always_inline))  int bar(int x) { return 4; }
void foo() {
  long long b = 1;
  int Y = bar(4);
  printf("%d\n", Y);
}

while clang generates correct IR.

llvm-svn: 71410
2009-05-10 23:14:38 +00:00
Nick Lewycky
f417462ddf Make MDNode use CallbackVH. Also change MDNode to store Value* instead of
Constant* in preperation of a future change to support holding non-Constants
in an MDNode.

llvm-svn: 71407
2009-05-10 20:57:05 +00:00
Sanjiv Gupta
03acc3e940 Module iterator contains list of filescope functions as well, we don't need to emit and global declarations for them. This was working earlier and was broken during one of the recent commit for PIC16 naming.
llvm-svn: 71394
2009-05-10 16:18:39 +00:00
Anton Korobeynikov
02d9c5b905 Add imm-reg and imm-mem patters for cmp on msp430
(imm is allowed to be source operand, not dest...)

llvm-svn: 71393
2009-05-10 14:49:00 +00:00
Anton Korobeynikov
fe1c6d85b8 Add MSP430 test for PR4136
llvm-svn: 71392
2009-05-10 14:48:36 +00:00
Sanjiv Gupta
07c4b65112 Changed lowering and asmprinter to use ABI Names class called PAN.
llvm-svn: 71386
2009-05-10 05:23:47 +00:00
Bill Wendling
c4ffa72fc4 --- Reverse-merging r71370 into '.':
U    lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp

Revert r71370.

llvm-svn: 71373
2009-05-10 00:10:50 +00:00
Bill Wendling
bea75516f2 A debug function start was not being recorded when the optimization level wasn't
None. However, we were always recording the region end. There's no longer a good
reason for this code to be separated out between the different opt levels, as it
was doing pretty much the same thing anyway.

llvm-svn: 71370
2009-05-09 23:51:35 +00:00
Evan Cheng
581641b664 Oops. Don't forget to align single bb loops.
llvm-svn: 71363
2009-05-09 19:18:01 +00:00
Chris Lattner
e8160d0836 fix typo
llvm-svn: 71362
2009-05-09 18:11:50 +00:00
Eli Friedman
aec1764402 Allow scalar evolution to compute iteration counts for loops with a
pointer-based condition.  This fixes PR3171.

llvm-svn: 71354
2009-05-09 12:32:42 +00:00
Eli Friedman
69845a85a5 Remove a completed optimization. Add a potential optimization I ran
into.

llvm-svn: 71352
2009-05-09 08:40:15 +00:00
Duncan Sands
f7af13b2d4 Rename PaddedSize to AllocSize, in the hope that this
will make it more obvious what it represents, and stop
it being confused with the StoreSize.

llvm-svn: 71349
2009-05-09 07:06:46 +00:00
Sanjiv Gupta
65a3fde6a5 Use 16 bit arithmetic while retrieving the address of callee's frame during indirect function calls, and set pclath before every call to retrieve the frame address.
llvm-svn: 71323
2009-05-09 05:11:19 +00:00
Evan Cheng
bf67b0edef Factor out code that optimize loop terminating condition.
llvm-svn: 71305
2009-05-09 01:08:24 +00:00
Dan Gohman
3de703ce43 Don't attempt to handle unsized types in ScalarEvolution's GEP analyzer.
llvm-svn: 71302
2009-05-09 00:14:52 +00:00
Evan Cheng
06b0d3879e Enable loop bb placement optimization.
llvm-svn: 71291
2009-05-08 23:35:49 +00:00
Dan Gohman
141989d3c2 Fix bogus overflow checks by replacing them with actual
overflow checks.

llvm-svn: 71284
2009-05-08 23:11:16 +00:00
Evan Cheng
8e26879521 PPC::B and PPC::BCC's target operand may be an immediate.
llvm-svn: 71282
2009-05-08 23:09:25 +00:00
Mike Stump
5deb77232a In non-pic builds, we can use -mdynamic-no-pic for a little more speed.
llvm-svn: 71281
2009-05-08 23:08:58 +00:00
Dan Gohman
98da279d6d Use .td for tablegen files, not .ll.
llvm-svn: 71277
2009-05-08 23:01:28 +00:00
Mike Stump
9779d47f7a Avoid warning in release-asserts build.
llvm-svn: 71275
2009-05-08 22:53:06 +00:00
Bill Wendling
1dccca6452 Mirror how Fast ISel determines if a region.end intrinsic is the end of an
inlined function or the end of a function. Before, this was never executing the
"inlined" version of the Record method.

This will become important once the inlined Dwarf writer patch lands.

llvm-svn: 71268
2009-05-08 21:14:49 +00:00
Dan Gohman
603f022049 Fold trunc casts into add-recurrence expressions, allowing the
add-recurrence to be exposed. Add a new SCEV folding rule to
help simplify expressions in the presence of these extra truncs.

llvm-svn: 71264
2009-05-08 21:03:19 +00:00
Bill Wendling
6ad9e22d42 Compute the offsets of the compile units. We need this so that when we emit a
concrete instance of an inlined function, we can get the actual address of the
abstract instance inside of the compile unit.

This isn't currently used, but will be by a future check-in.

llvm-svn: 71263
2009-05-08 21:03:15 +00:00
Dan Gohman
6eaf7850d8 Fix another bug in r71252. This code supports GetElementPtr
constant exprs as well as instructions.

llvm-svn: 71262
2009-05-08 20:58:38 +00:00
Bill Wendling
3bb11df772 Fix typo.
llvm-svn: 71260
2009-05-08 20:49:29 +00:00