Commit Graph

90280 Commits

Author SHA1 Message Date
Richard Relph
1a5c0510ec Avoid generating ISD::SELECT for vector operands to SIGN_EXTEND
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176881 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-12 18:17:18 +00:00
Kevin Enderby
2ee69f1be6 Remove the assert()'s from the LLVMCreateDisasmCPU() library API and just
return 0 to indicate failure to create the disassembler.  A library routine
should not assert and just let the caller handler the error.  For example
darwin's otool(1) will simply print an error if it ends up using a library
that is not configured for a target it wants:

% otool -tv ViewController.o
ViewController.o:
(__TEXT,__text) section
can't create arm llvm disassembler

This is much better than an abort which appears as a crash to the user or
even the assert when using a Debug+Asserts built library:

Assertion failed: (MAI && "Unable to create target asm info!"), function LLVMCreateDisasmCPU, file /Volumes/SandBox/llvm/lib/MC/MCDisassembler/Disassembler.cpp, line 47.

radr://12539918


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176880 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-12 18:12:17 +00:00
Pete Cooper
8f8af529fc Add a doFinalization method to the DataLayout pass.
This pass is meant to be immutable, however it holds mutable state to cache StructLayouts.
This method will allow the pass manager to clear the mutable state between runs.

Note that unfortunately it is still necessary to have the destructor, even though it does the
same thing as doFinalization.  This is because most TargetMachines embed a DataLayout on which
doFinalization isn't run as its never added to the pass manager.

I also didn't think it was necessary to complication things with a deInit method for which
doFinalization and ~DataLayout both call as there's only one field of mutable state.  If we had
more fields to finalize i'd have added this.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176877 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-12 17:37:31 +00:00
Jan Wen Voung
4323665bd8 Revert the test moves from 176733. Use "REQUIRES: asserts" instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176873 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-12 16:27:52 +00:00
Dan Gohman
a15e708b1b Change the order of the operands in patchAndReplaceAllUsesWith so
that they're more consistent with Value::replaceAllUsesWith.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176872 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-12 16:22:56 +00:00
Hal Finkel
4d53e7798c Don't reserve R2 on Darwin/PPC
Now that only the register-scavenger version of the CR spilling code remains,
we no longer need the Darwin R2 hack. Darwin can use R0 as a spare register in
any case where the System V ABI uses it (R0 is special architecturally, and so
is reserved under all common ABIs).

A few test cases needed to be updated to reflect the register-allocation changes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176868 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-12 15:18:14 +00:00
Hal Finkel
7285e8d98c PPC should always use the register scavenger for CR spilling
This removes the -disable-ppc[32|64]-regscavenger options; the code
that uses the register scavenger has been working well (and has been the default)
for some time, and we don't need options to enable the old (broken) CR spilling code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176865 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-12 14:12:16 +00:00
Patrik Hagglund
ac5b3915aa Small fix for cost analysis of ptrtoint.
This seems to be a "copy-paste error" introducecd in r156140.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176863 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-12 13:18:30 +00:00
Patrik Hagglund
775a266415 In r169695, the address space limit for tests was replaced with a data
segment limit. Now, as a complement, add a stack space limit.

Otherwise, tests may grow undesirable large at inifinite
recursion. (Seen at r176838,
test/Assembler/2010-02-05-FunctionLocalMetadataBecomesNull.ll)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176862 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-12 12:38:10 +00:00
Matthew Curtis
29da043ae3 ReleaseNotes: Add Hexagon Target section
And mention removal of hexagonv2 and hexagonv3 support (r176859).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176860 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-12 12:20:51 +00:00
Bill Wendling
da6f62950d Reflect reality.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176858 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-12 10:38:39 +00:00
Akira Hatanaka
f635ef4017 [mips] Rename function and variable names to start with proper case. Fix typos.
Delete commented-out code.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176844 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-12 00:16:36 +00:00
Meador Inge
67cb638629 LibCallSimplifier: optimize speed for short-lived instances
Nadav reported a performance regression due to the work I did to
merge the library call simplifier into instcombine [1].  The issue
is that a new LibCallSimplifier object is being created whenever
InstCombiner::runOnFunction is called.  Every time a LibCallSimplifier
object is used to optimize a call it creates a hash table to map from
a function name to an object that optimizes functions of that name.
For short-lived LibCallSimplifier instances this is quite inefficient.
Especially for cases where no calls are actually simplified.

This patch fixes the issue by dropping the hash table and implementing
an explicit lookup function to correlate the function name to the object
that optimizes functions of that name.  This avoids the cost of always
building and destroying the hash table in cases where the LibCallSimplifier
object is short-lived and avoids the cost of building the table when no
simplifications are actually preformed.

On a benchmark containing 100,000 calls where none of them are simplified
I noticed a 30% speedup.  On a benchmark containing 100,000 calls where
all of them are simplified I noticed an 8% speedup.

[1] http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20130304/167639.html

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176840 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-12 00:08:29 +00:00
David Blaikie
c0ec8a4f4d Remove support for versioned debug info.
Versioned debug info support has been a burden to maintain & also compromised
current debug info verification by causing test cases testing old debug info to
remain rather than being updated to the latest. It also makes it hard to add or
change the metadata schema by requiring various backwards-compatibility in the
DI* hierarchy.

So it's being removed in preparation for new changes to the schema to tidy up
old/unnecessary fields and add new fields needed for new debug info (well, new
to LLVM at least).

The more surprising part of this is the changes to DI*::Verify - this became
necessary due to the changes to AsmWriter. AsmWriter was relying on the version
test to decide which bits of metadata were actually debug info when printing
the comment annotations. Without the version information the tag numbers were
too common & it would print debug info on random metadata that happened to
start with an integer that matched a tag number. Instead this change makes the
Verify functions more precise (just adding "number of operands" checks - not
type checking those operands yet) & relies on that to decide which metadata is
debug info metadata.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176838 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-11 23:39:23 +00:00
David Blaikie
6643868498 Add asserts to DIBuilder & fix DINameSpace::Verify to allow unnamed namespaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176837 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-11 23:21:19 +00:00
Eli Bendersky
6acbcd423b Residual cleanup: live-out set is gone
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176836 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-11 23:18:25 +00:00
NAKAMURA Takumi
7e6274dc66 llvm/test/CodeGen/R600/schedule-*.ll: Let them require +Asserts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176835 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-11 23:16:30 +00:00
David Blaikie
850b74d392 Upgrading debug info test cases to be (more) compatible with the current debug info format.
These cases were found by further work to remove support for debug info
versioning. Common cleanups (other than changing the version info in the tag
field) included adding the last parameter to compile_units (recently added for
fission support) and other cases of trailing fields in lexical blocks, compile
units, and subprograms.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176834 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-11 22:37:40 +00:00
David Blaikie
7cf04f3e12 Remove duplicate test contents.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176831 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-11 22:10:14 +00:00
Nick Lewycky
33cdfe9f19 Fix a crasher newly introduced in r176659/r176649, where fast-isel tries to
lower an expect intrinsic that is a constant expression.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176830 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-11 21:44:37 +00:00
Kevin Enderby
12dccaed9c Fixes disassembler crashes on 2013 Haswell RTM instructions.
rdar://13318048


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176828 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-11 21:17:13 +00:00
Bill Wendling
d5bb20805e Don't remove a landing pad if the invoke requires a table entry.
An invoke may require a table entry. For instance, when the function it calls
is expected to throw.
<rdar://problem/13360379>


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176827 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-11 20:53:00 +00:00
Vincent Lejeune
fd49dac48f R600: Fix JUMP handling so that MachineInstr verification can occur
This allows R600 Target to use the newly created -verify-misched llc flag

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176819 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-11 18:15:06 +00:00
Eli Bendersky
48f8015121 Missing period in doc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176809 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-11 16:51:15 +00:00
NAKAMURA Takumi
0087f3c6fb llvm/test/CodeGen/X86/handle-move.ll: Mark it as XFAIL:cygming. Investigating.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176808 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-11 16:30:26 +00:00
Sean Silva
6ccdfc54ba [docs] Remove explicit authorship.
In the spirit of r172109. Version control keeps a far more detailed
record of authorship anyways.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176807 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-11 16:25:16 +00:00
NAKAMURA Takumi
be15cdda54 Suppress atomic(32|64).ll as XFAIL on win32 codegen. Investigating.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176798 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-11 08:39:48 +00:00
NAKAMURA Takumi
3f179b59e5 R600MachineScheduler.cpp: Fix use cases of dbgs(). Don't include <iostream> here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176797 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-11 08:19:28 +00:00
Lang Hames
14d852362c Remove date from test case file name. The PR number provides a unique ID already.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176796 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-11 03:49:23 +00:00
Nick Lewycky
f3a64c00c1 Correct this error message, and most importantly make it distinct from the
error above. Based on a patch by Peter Zotov!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176794 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-10 22:01:44 +00:00
Nick Lewycky
0ebc084132 Use LLVMBool instead of 'bool' in the C API. Based on a patch by Peter Zotov!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176793 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-10 21:58:22 +00:00
Hal Finkel
76a05c93b1 BBVectorize: Fixup debugging statements
After the recent data-structure improvements, a couple of debugging statements
were broken (printing pointer values).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176791 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-10 20:57:42 +00:00
Jakub Staszak
760fa5dc80 Cleanup #includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176787 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-10 13:11:23 +00:00
Jakub Staszak
03bf8fd288 Remove unneeded #include.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176785 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-10 01:15:14 +00:00
Jakub Staszak
35d00e55dc Add some constantness in MachinePostDominators.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176784 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-10 01:14:42 +00:00
Jakub Staszak
ec3bb4b660 Remove unneeded #includes. Use forward declarations instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176783 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-10 00:34:01 +00:00
Jakub Staszak
e939a066c8 Remove unneeded #includes. Use forward declarations instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176782 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-10 00:20:16 +00:00
Craig Topper
ddde2082db Remove an unused member variable from HelpPrinter. Move another member variable to be a local variable in the only method that uses it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176778 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-09 23:29:37 +00:00
Lang Hames
f793de7a23 Don't glue users to extract_subreg when selecting the llvm.arm.ldrexd
intrinsic - it can cause impossible-to-schedule subgraphs to be
introduced.

PR15053.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176777 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-09 22:56:09 +00:00
Jakub Staszak
d683edc711 Remove unneeded cast.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176776 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-09 19:34:14 +00:00
Benjamin Kramer
0d932717d8 Remove a source of nondeterminism from the LoopVectorizer.
This made us emit runtime checks in a random order. Hopefully bootstrap
miscompares will go away now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176775 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-09 19:22:40 +00:00
Benjamin Kramer
96a198755e Fix test case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176773 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-09 18:34:27 +00:00
Benjamin Kramer
1cb47b9afe Test case hygiene.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176772 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-09 18:25:40 +00:00
Jakub Staszak
64bf55af6f Remove unneeded const_cast.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176771 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-09 18:24:26 +00:00
Jakub Staszak
209cb5b56b Use forward declaration instead of #include.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176770 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-09 18:05:34 +00:00
Arnold Schwaighofer
738295e457 LoopVectorizer: Ignore all dbg intrinisic
Ignore all DbgIntriniscInfo instructions instead of just DbgValueInst.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176769 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-09 16:27:27 +00:00
Arnold Schwaighofer
56ee544a3a LoopVectorizer: Ignore dbg.value instructions
We want vectorization to happen at -g. Ignore calls to the dbg.value intrinsic
and don't transfer them to the vectorized code.

radar://13378964

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176768 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-09 15:56:34 +00:00
Benjamin Kramer
576f62c1ea TLI: Microoptimize calls to strlen+memcmp to strncmp.
The strlen+memcmp was hidden in a call to StringRef::operator==. We check if
there are any null bytes in the string upfront so we can simplify the comparison
Small speedup when compiling code with many function calls.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176766 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-09 13:48:23 +00:00
Jakub Staszak
e629a33d16 Simplify code. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176765 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-09 11:18:59 +00:00
Nick Lewycky
60d16a27da Use the correct index variable. This is the meat of what was supposed to be in
r176751. Also, learn a lesson about applying patches by hand/eyeball.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176764 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-09 10:13:26 +00:00