Commit Graph

90097 Commits

Author SHA1 Message Date
Akira Hatanaka 0bb60d8972 [mips] Rename function and variable names to start with proper case. Fix typos.
Delete commented-out code.

llvm-svn: 176844
2013-03-12 00:16:36 +00:00
Meador Inge 20255ef24d 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

llvm-svn: 176840
2013-03-12 00:08:29 +00:00
David Blaikie dc69ebb1fc 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.

llvm-svn: 176838
2013-03-11 23:39:23 +00:00
David Blaikie 085abe38e4 Add asserts to DIBuilder & fix DINameSpace::Verify to allow unnamed namespaces.
llvm-svn: 176837
2013-03-11 23:21:19 +00:00
Eli Bendersky d42740843f Residual cleanup: live-out set is gone
llvm-svn: 176836
2013-03-11 23:18:25 +00:00
NAKAMURA Takumi e781913ac4 llvm/test/CodeGen/R600/schedule-*.ll: Let them require +Asserts.
llvm-svn: 176835
2013-03-11 23:16:30 +00:00
David Blaikie 47922fb006 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.

llvm-svn: 176834
2013-03-11 22:37:40 +00:00
David Blaikie 789beb5300 Remove duplicate test contents.
llvm-svn: 176831
2013-03-11 22:10:14 +00:00
Nick Lewycky 48beb21185 Fix a crasher newly introduced in r176659/r176649, where fast-isel tries to
lower an expect intrinsic that is a constant expression.

llvm-svn: 176830
2013-03-11 21:44:37 +00:00
Kevin Enderby f15856ebb4 Fixes disassembler crashes on 2013 Haswell RTM instructions.
rdar://13318048

llvm-svn: 176828
2013-03-11 21:17:13 +00:00
Bill Wendling 9534d8885f 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>

llvm-svn: 176827
2013-03-11 20:53:00 +00:00
Vincent Lejeune e5ecf10a02 R600: Fix JUMP handling so that MachineInstr verification can occur
This allows R600 Target to use the newly created -verify-misched llc flag

llvm-svn: 176819
2013-03-11 18:15:06 +00:00
Eli Bendersky 9c0d49331e Missing period in doc
llvm-svn: 176809
2013-03-11 16:51:15 +00:00
NAKAMURA Takumi a60c7a0f4b llvm/test/CodeGen/X86/handle-move.ll: Mark it as XFAIL:cygming. Investigating.
llvm-svn: 176808
2013-03-11 16:30:26 +00:00
Sean Silva 22ba6ec69a [docs] Remove explicit authorship.
In the spirit of r172109. Version control keeps a far more detailed
record of authorship anyways.

llvm-svn: 176807
2013-03-11 16:25:16 +00:00
NAKAMURA Takumi 1e02e73c30 Suppress atomic(32|64).ll as XFAIL on win32 codegen. Investigating.
llvm-svn: 176798
2013-03-11 08:39:48 +00:00
NAKAMURA Takumi 756cf8867a R600MachineScheduler.cpp: Fix use cases of dbgs(). Don't include <iostream> here.
llvm-svn: 176797
2013-03-11 08:19:28 +00:00
Lang Hames 82d48e7fb0 Remove date from test case file name. The PR number provides a unique ID already.
llvm-svn: 176796
2013-03-11 03:49:23 +00:00
Nick Lewycky 7b287eea22 Correct this error message, and most importantly make it distinct from the
error above. Based on a patch by Peter Zotov!

llvm-svn: 176794
2013-03-10 22:01:44 +00:00
Nick Lewycky 5f50854186 Use LLVMBool instead of 'bool' in the C API. Based on a patch by Peter Zotov!
llvm-svn: 176793
2013-03-10 21:58:22 +00:00
Hal Finkel f610be9f36 BBVectorize: Fixup debugging statements
After the recent data-structure improvements, a couple of debugging statements
were broken (printing pointer values).

llvm-svn: 176791
2013-03-10 20:57:42 +00:00
Jakub Staszak df17ddd56b Cleanup #includes.
llvm-svn: 176787
2013-03-10 13:11:23 +00:00
Jakub Staszak f0803370cb Remove unneeded #include.
llvm-svn: 176785
2013-03-10 01:15:14 +00:00
Jakub Staszak 9342333f39 Add some constantness in MachinePostDominators.h.
llvm-svn: 176784
2013-03-10 01:14:42 +00:00
Jakub Staszak c733bf2669 Remove unneeded #includes. Use forward declarations instead.
llvm-svn: 176783
2013-03-10 00:34:01 +00:00
Jakub Staszak 767621dd1e Remove unneeded #includes. Use forward declarations instead.
llvm-svn: 176782
2013-03-10 00:20:16 +00:00
Craig Topper fa9888fce7 Remove an unused member variable from HelpPrinter. Move another member variable to be a local variable in the only method that uses it.
llvm-svn: 176778
2013-03-09 23:29:37 +00:00
Lang Hames be3d971143 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.

llvm-svn: 176777
2013-03-09 22:56:09 +00:00
Jakub Staszak 56436543b3 Remove unneeded cast.
llvm-svn: 176776
2013-03-09 19:34:14 +00:00
Benjamin Kramer 6eda79f69a 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.

llvm-svn: 176775
2013-03-09 19:22:40 +00:00
Benjamin Kramer fc0c7bf0d7 Fix test case.
llvm-svn: 176773
2013-03-09 18:34:27 +00:00
Benjamin Kramer 01b75cc0f2 Test case hygiene.
llvm-svn: 176772
2013-03-09 18:25:40 +00:00
Jakub Staszak d6ca3c5ba5 Remove unneeded const_cast.
llvm-svn: 176771
2013-03-09 18:24:26 +00:00
Jakub Staszak 8adba50a40 Use forward declaration instead of #include.
llvm-svn: 176770
2013-03-09 18:05:34 +00:00
Arnold Schwaighofer 8b3dc09400 LoopVectorizer: Ignore all dbg intrinisic
Ignore all DbgIntriniscInfo instructions instead of just DbgValueInst.

llvm-svn: 176769
2013-03-09 16:27:27 +00:00
Arnold Schwaighofer 4090b61ac3 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

llvm-svn: 176768
2013-03-09 15:56:34 +00:00
Benjamin Kramer 160f72dc8e 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.

llvm-svn: 176766
2013-03-09 13:48:23 +00:00
Jakub Staszak 2ef36b633b Simplify code. No functionality change.
llvm-svn: 176765
2013-03-09 11:18:59 +00:00
Nick Lewycky 291df6ec42 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.

llvm-svn: 176764
2013-03-09 10:13:26 +00:00
Nick Lewycky 4288f9ef17 Commit the right files for r176762. Sigh.
llvm-svn: 176763
2013-03-09 09:32:16 +00:00
Nick Lewycky c1f9694d05 We need a shndx if the number of sections breaks SHN_LORESERVE. This condition
for choosing to emit a shndx was simply testing the wrong variable.

llvm-svn: 176762
2013-03-09 09:31:44 +00:00
Nick Lewycky 03aed11cdb Fix bug introduced in r176616 when making function identifier numbers stable.
Count the subprograms, not the compile units.

llvm-svn: 176751
2013-03-09 02:06:37 +00:00
Nick Lewycky 88f1d0d64e Don't emit the extra checksum into the .gcda file if the user hasn't asked for
it. Fortunately, versions of gcov that predate the extra checksum also ignore
any extra data, so this isn't a problem. There will be a matching commit in
compiler-rt.

llvm-svn: 176745
2013-03-09 01:33:06 +00:00
Jakob Stoklund Olesen 1001673865 Remove wrong and unnecessary assertion.
PHIs are allowed to have multiple operand pairs per predecessor, and
this code works just fine when it happens.

llvm-svn: 176734
2013-03-08 23:00:13 +00:00
Jan Wen Voung 7857a64909 Disable statistics on Release builds and move tests that depend on -stats.
Summary:
Statistics are still available in Release+Asserts (any +Asserts builds),
and stats can also be turned on with LLVM_ENABLE_STATS.

Move some of the FastISel stats that were moved under DEBUG()
back out of DEBUG(), since stats are disabled across the board now.

Many tests depend on grepping "-stats" output.  Move those into
a orig_dir/Stats/. so that they can be marked as unsupported
when building without statistics.

Differential Revision: http://llvm-reviews.chandlerc.com/D486

llvm-svn: 176733
2013-03-08 22:56:31 +00:00
Eli Bendersky 970cc63448 Clean up out-of-date comments and some stray whitespace
llvm-svn: 176729
2013-03-08 22:29:44 +00:00
Michael Ilseman 74ffc27d25 Early exit from getAllocationData() and isFreeCall() for intrinsics.
llvm-svn: 176722
2013-03-08 21:15:00 +00:00
David Blaikie 5846239e16 Assert to bounds check MDNode::getOperand.
The getOperandPtr utility already bounds checks, but allows one-off-the-end.
This assert should catch the cases that could previously have been dereferencing
these one-off-the-end pointer. Happily, no cases of this came up with this
change.

llvm-svn: 176721
2013-03-08 21:08:23 +00:00
Michael Ilseman d974524d3d Remove trailing whitespace
llvm-svn: 176720
2013-03-08 21:03:09 +00:00
Jakob Stoklund Olesen 070015c6aa No really, don't use end().
Clearly, this function is never actually called with the last
instruction in the function.

llvm-svn: 176708
2013-03-08 18:36:36 +00:00