Commit Graph

136494 Commits

Author SHA1 Message Date
Amara Emerson
72b86293cb MCJIT unit test: add calls to ensure that instruction caches are properly invalidated before code execution.
llvm-svn: 167146
2012-10-31 17:44:16 +00:00
Amara Emerson
eb7fb84a3e Port lli bug fix from r166920 to MCJIT unit test.
llvm-svn: 167145
2012-10-31 17:41:51 +00:00
Amara Emerson
f270b82181 Commit access test.
llvm-svn: 167144
2012-10-31 17:35:12 +00:00
Bill Schmidt
22bd6d18d1 This patch removes the XFAIL for powerpc for
test/CodeGenCXX/member-alignment.cpp.  The test succeeds for
powerpc64-unknown-linux-gnu.  If other flavors of powerpc are
shown by buildbots to still be broken, we can adjust the test
at that time.

llvm-svn: 167143
2012-10-31 17:31:46 +00:00
Argyrios Kyrtzidis
289e4a37ee If skipping bodies is enabled outside code-completion, just skip the body directly
without using tentative parsing.

llvm-svn: 167142
2012-10-31 17:29:28 +00:00
Argyrios Kyrtzidis
3a6c8141f9 Decouple code-completion for the SkipFunctionBodies frontend option and
add a test to make sure code-completion skips bodies.

llvm-svn: 167141
2012-10-31 17:29:22 +00:00
Arnold Schwaighofer
9d08a15b0f Remove stale documentation about tail duplicaton IR pass
We no longer have a tail duplication pass that runs on LLVM IR. It was removed
in 3.0.

llvm-svn: 167140
2012-10-31 17:25:31 +00:00
Akira Hatanaka
c096c88067 Test case for r167039. Check that tail-call optimization is disabled for
mips16.

llvm-svn: 167139
2012-10-31 17:25:23 +00:00
Jordan Rose
417591fba7 [analyzer] Let ConstraintManager subclasses provide a more efficient checkNull.
Previously, every call to a ConstraintManager's isNull would do a full
assumeDual to test feasibility. Now, ConstraintManagers can override
checkNull if they have a cheaper way to do the same thing.
RangeConstraintManager can do this in less than half the work.

<rdar://problem/12608209>

llvm-svn: 167138
2012-10-31 16:44:55 +00:00
Eli Bendersky
70f4e794b5 Fix typo in CodeGenerator doc
llvm-svn: 167137
2012-10-31 16:41:07 +00:00
Benjamin Kramer
ede2fe3bfd LCSSA: Try to recover compile time regressions due to SCEV updates.
- Use value handle tricks to communicate use replacements instead of forgetLoop, this is a lot faster.
- Move the "big hammer" out of the main loop so it's not called for every instruction.

This should recover most (if not all) compile time regressions introduced by this code.

llvm-svn: 167136
2012-10-31 16:30:03 +00:00
Nadav Rotem
ec3ab49dda Put the threshold magic number in a variable.
llvm-svn: 167134
2012-10-31 16:22:16 +00:00
Ulrich Weigand
1caa6f9575 Disable all old-JIT unit tests on PowerPC.
These tests were all failing since the old JIT doesn't work
for PowerPC (any more), and there are no plans to attempt to
fix it again (instead, work focuses on MCJIT).

llvm-svn: 167133
2012-10-31 16:18:02 +00:00
Hans Wennborg
b71f72aa82 Remove fixme about unreachable cases from SwitchToLookupTable
SimplifyCFG will have removed those cases for us.

llvm-svn: 167132
2012-10-31 16:15:25 +00:00
Nadav Rotem
1265ea8f8d Remove enum values since they are not used anymore.
llvm-svn: 167131
2012-10-31 16:14:06 +00:00
Hans Wennborg
4fef2fec3d Address Duncan's comments on r167121.
llvm-svn: 167130
2012-10-31 15:31:09 +00:00
Hal Finkel
842ad0b621 BBVectorize: Choose pair ordering to minimize shuffles
BBVectorize would, except for loads and stores, always fuse instructions
so that the first instruction (in the current source order) would always
represent the low part of the input vectors and the second instruction
would always represent the high part. This lead to too many shuffles
being produced because sometimes the opposite order produces fewer of them.

With this change, BBVectorize tracks the kind of pair connections that form
the DAG of candidate pairs, and uses that information to reorder the pairs to
avoid excess shuffles. Using this information, a future commit will be able
to add VTTI-based shuffle costs to the pair selection procedure. Importantly,
the number of remaining shuffles can now be estimated during pair selection.

There are some trivial instruction reorderings in the test cases, and one
simple additional test where we certainly want to do a reordering to
avoid an unnecessary shuffle.

llvm-svn: 167122
2012-10-31 15:17:07 +00:00
Hans Wennborg
09acdb9a16 Address Duncan's comments on r167115
- Use 0 instead of NULL
 - Helper function for "dyn_cast, else lookup in the constant pool".

llvm-svn: 167121
2012-10-31 15:14:39 +00:00
Meador Inge
05a625a0ed instcombine: Migrate strto* optimizations
This patch migrates the strto* optimizations from the simplify-libcalls
pass into the instcombine library call simplifier.

llvm-svn: 167119
2012-10-31 14:58:26 +00:00
Simon Atanasyan
a47ba2958f Fix if-else braces layout accordingly to the style guide.
llvm-svn: 167118
2012-10-31 14:39:28 +00:00
Hans Wennborg
793b342dcf Fix false -> NULL conversion from r167115 spotted by Benjamin Kramer.
llvm-svn: 167117
2012-10-31 14:36:48 +00:00
Benjamin Kramer
1559127f6f Replace some instances of UniqueVector with SetVector, which is slightly cheaper.
No functionality change.

llvm-svn: 167116
2012-10-31 13:45:49 +00:00
Hans Wennborg
9e74dd97b8 Do simple constant propagation in lookup table formation for switches
By propagating the value for the switch condition, LLVM can now build
lookup tables for code such as:

  switch (x) {
    case 1: return 5;
    case 2: return 42;
    case 3: case 4: case 5:
      return x - 123;
    default:
      return 123;
  }

Given that x is known for each case, "x - 123" becomes a constant for
cases 3, 4, and 5.

llvm-svn: 167115
2012-10-31 13:42:45 +00:00
Simon Atanasyan
86bdab7468 Extend -Bprefix functionality and make it closer to gcc. If the "prefix"
is not a directory, Driver::GetProgramPath() routine does not try to append
the program name as a "path component" to it. It just joins the "prefix" with
the program name and checks the resulting path existence.

The patch reviewed by Rafael Espindola.

llvm-svn: 167114
2012-10-31 12:01:53 +00:00
Benjamin Kramer
c914ab6e3c Fix a couple of comment typos.
llvm-svn: 167113
2012-10-31 11:25:32 +00:00
Benjamin Kramer
8682ac1a77 LCSSA: Add a workaround for another nasty SCEV cache invalidation issue.
I'm not entirely happy with this solution, but I don't see a smarter way currently.
Fixes PR14214.

llvm-svn: 167112
2012-10-31 10:01:29 +00:00
Evgeniy Stepanov
ef94169938 Add IRBuilderBase::getIntPtrTy.
llvm-svn: 167111
2012-10-31 09:50:01 +00:00
Benjamin Kramer
24c643b6de DependenceAnalysis: Don't crash if there is no constant operand.
This makes the code match the comments. Resolves a crash in loop idiom (PR14219).

llvm-svn: 167110
2012-10-31 09:20:38 +00:00
James Molloy
2f728a9185 Add support for ARM segment types PT_ARM_ARCHEXT, PT_ARM_EXIDX and PT_ARM_UNWIND.
Patch by Pete Chou!

llvm-svn: 167109
2012-10-31 09:10:56 +00:00
James Molloy
3ebe7a5a5b Add support for Cortex-A15 host recognition.
No testcase, as this is only testable on a C-A15 board.

llvm-svn: 167108
2012-10-31 09:07:37 +00:00
Reed Kotler
27a7229c47 Implement ADJCALLSTACKUP and ADJCALLSTACKDOWN
llvm-svn: 167107
2012-10-31 05:21:10 +00:00
Craig Topper
8cd3b07a51 Add scalar forms of FMA4 VFNMSUB/VFNMADD to folding tables. Patch from Cameron McInally.
llvm-svn: 167106
2012-10-31 04:59:46 +00:00
Meador Inge
6f8e01121a instcombine: Migrate strpbrk optimizations
This patch migrates the strpbrk optimizations from the simplify-libcalls
pass into the instcombine library call simplifier.

llvm-svn: 167105
2012-10-31 04:29:58 +00:00
Michael Liao
e2d7e4e8e5 Clean up redundant SP register maintained in X86 TLI
llvm-svn: 167104
2012-10-31 04:14:09 +00:00
Meador Inge
d589ac621b instcombine: Migrate strlen optimizations
This patch migrates the strlen optimizations from the simplify-libcalls
pass into the instcombine library call simplifier.

llvm-svn: 167103
2012-10-31 03:33:06 +00:00
Meador Inge
067294b3ac instcombine: Migrate strncpy optimizations
This patch migrates the strncpy optimizations from the simplify-libcalls
pass into the instcombine library call simplifier.

llvm-svn: 167102
2012-10-31 03:33:00 +00:00
Nadav Rotem
ce77ab0c24 LoopVectorize: Do not vectorize loops with tiny constant trip counts.
llvm-svn: 167101
2012-10-31 03:31:07 +00:00
Rafael Espindola
fbc567ed05 Remove empty directories.
llvm-svn: 167100
2012-10-31 02:34:48 +00:00
Anna Zaks
1e80d8b49c [analyzer] SimpleStreamChecker - remove evalAssume and other refinements
llvm-svn: 167099
2012-10-31 02:32:41 +00:00
Rafael Espindola
ebc56b217b Remove really old benchmark data.
llvm-svn: 167098
2012-10-31 02:29:15 +00:00
Sean Callanan
256cf2cb49 Rmoved a duplicate version of SetSelectedThreadByID
that confused external clients.

<rdar://problem/12599528>

llvm-svn: 167097
2012-10-31 02:12:08 +00:00
Sean Callanan
5bb2673fc8 Removed some spurious files from our Copy
Headers build phase.

llvm-svn: 167096
2012-10-31 02:03:31 +00:00
Sean Callanan
4ac7ec7341 Fixed a crash when we couldn't create a
CXXMethodDecl but tried to manipulate it
anyway.

<rdar://problem/12601996>

llvm-svn: 167095
2012-10-31 02:01:58 +00:00
Jason Molenda
e2db91b8b0 Fix the bit pattern for vst1 in EmulateInstructionARM::GetThumbOpcodeForInstruction
so it is recognized correctly.  The second patch needed for <rdar://problem/10652166>.

llvm-svn: 167094
2012-10-31 02:00:46 +00:00
Rafael Espindola
69aa04dd8f Remove the -ccc-no-clang option.
llvm-svn: 167093
2012-10-31 01:21:20 +00:00
Anna Zaks
7bd0674dea [analyzer]Don't invalidate const arguments when there is no
IdentifierInfo.

Ee: C++ copy constructors.
llvm-svn: 167092
2012-10-31 01:18:26 +00:00
Anna Zaks
408f7d0144 Address Jordan's review: comments, spaces.
llvm-svn: 167091
2012-10-31 01:18:22 +00:00
Bill Schmidt
9953cf294b This patch addresses an ABI compatibility issue with empty aggregate
parameters.  Examples of these are:

  struct { } a;
  union { } b[256];
  int a[0];

An empty aggregate has an address, although dereferencing that address is
pointless.  When passed as a parameter, an empty aggregate does not consume
a protocol register, nor does it consume a doubleword in the parameter save
area.  Passing an empty aggregate by reference passes an address just as
for any other aggregate.  Returning an empty aggregate uses GPR3 as a hidden
address of the return value location, just as for any other aggregate.

The patch modifies PPCTargetLowering::LowerFormalArguments_64SVR4 and
PPCTargetLowering::LowerCall_64SVR4 to properly skip empty aggregate
parameters passed by value.  The handling of return values and by-reference
parameters was already correct.

Built on powerpc64-unknown-linux-gnu and tested with no new regressions.
A test case is included to test proper handling of empty aggregate
parameters on both sides of the function call protocol.

llvm-svn: 167090
2012-10-31 01:15:05 +00:00
Seth Cantrell
d7beb4a10a add test for r167063
llvm-svn: 167089
2012-10-31 01:03:35 +00:00
Akira Hatanaka
d837be780d Change signature of function RAFast::spillAll to avoid conversion between
type MachineInstr* and MachineBasicBlock::iterator.

llvm-svn: 167088
2012-10-31 00:56:01 +00:00