Commit Graph

83419 Commits

Author SHA1 Message Date
Marshall Clow
a6d98b8b6c Reverting makefile change wile I figure out what the heck happened
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159017 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-22 18:12:28 +00:00
Jakob Stoklund Olesen
e6d2114405 Remove some redundant LIS->hasInterval() checks.
These functions only operate on virtual registers now, and they all have
live ranges.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159015 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-22 17:49:44 +00:00
Marshall Clow
360713ec94 Added building yaml2obj to the configure+make build system
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159014 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-22 17:43:40 +00:00
Jakob Stoklund Olesen
834a9cdbb7 Use MRI::isConstantPhysReg() to check remat feasibility.
Don't depend on LiveIntervals::hasInterval() to determine if a physreg
is reserved and constant.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159013 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-22 17:31:01 +00:00
Kaelyn Uhrain
35ac4b0c45 Remove a variable that is unused when assertions aren't enabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159011 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-22 17:18:15 +00:00
Jakob Stoklund Olesen
e8a0a12864 Use regunit liveness to guide LiveDebugVariables.
This should produce the same results as using physreg liveness directly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159009 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-22 17:15:32 +00:00
Jakob Stoklund Olesen
241d0209a7 Remove LiveIntervals::trackingRegUnits().
With regunit liveness permanently enabled, this function would always
return true.

Also remove now obsolete code for checking physreg interference.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159006 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-22 16:46:44 +00:00
Jakob Stoklund Olesen
7ee3ca10f5 Revert remaining part of r93200: "Disable folding sext(trunc(x)) -> x"
This fixes PR5997.

These transforms were disabled because codegen couldn't deal with other
uses of trunc(x). This is now handled by the peephole pass.

This causes no regressions on x86-64.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159003 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-22 16:36:43 +00:00
Dmitri Gribenko
63e0e8d90b Change comment into proper Doxygen member comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159000 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-22 16:00:48 +00:00
Nuno Lopes
d845c34170 simplify code from previous commits (Thanks Duncan)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158999 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-22 15:50:53 +00:00
Stepan Dyatkovskiy
43c3a4a7e7 Fixed r158979.
Original message:
Performance optimizations:
- SwitchInst: case values stored separately from Operands List. It allows to make faster access to individual case value numbers or ranges.
- Optimized IntItem, added APInt value caching.
- Optimized IntegersSubsetGeneric: added optimizations for cases when subset is single number or when subset consists from single numbers only.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158997 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-22 14:53:30 +00:00
NAKAMURA Takumi
84f64f317f test/CodeGen/Generic/asm-large-immediate.ll: Mark it as XFAIL: powerpc, possibly due to r158939.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158994 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-22 13:41:00 +00:00
Rafael Espindola
9cfc799171 Remove another duplicated variable. We only need one to tell us if the linker
knows dwarf or not.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158993 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-22 13:32:49 +00:00
Rafael Espindola
2241e51406 Fix a FIXME: DwarfRequiresRelocationForSectionOffset is the same as
DwarfUsesRelocationsAcrossSections.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158992 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-22 13:24:07 +00:00
Duncan Sands
37eeb058a3 Revert commit 158979 (dyatkovskiy) since it is causing several buildbots to
fail.  Original commit message:

Performance optimizations:
- SwitchInst: case values stored separately from Operands List. It allows to make faster access to individual case value numbers or ranges.
- Optimized IntItem, added APInt value caching.
- Optimized IntegersSubsetGeneric: added optimizations for cases when subset is single number or when subset consists from single numbers only.

On my machine these optimizations gave about 4-6% of compile-time improvement.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158986 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-22 10:35:06 +00:00
Stepan Dyatkovskiy
7351256208 Performance optimizations:
- SwitchInst: case values stored separately from Operands List. It allows to make faster access to individual case value numbers or ranges.
- Optimized IntItem, added APInt value caching.
- Optimized IntegersSubsetGeneric: added optimizations for cases when subset is single number or when subset consists from single numbers only.

On my machine these optimizations gave about 4-6% of compile-time improvement.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158979 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-22 07:35:13 +00:00
Andrew Trick
d85934b3e5 Use "NoItineraries" for processors with no itineraries.
This makes it explicit when ScoreboardHazardRecognizer will be used.
"GenericItineraries" would only make sense if it contained real
itinerary values and still required ScoreboardHazardRecognizer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158963 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-22 03:58:51 +00:00
Jakob Stoklund Olesen
e208c49172 Functions calling __builtin_eh_return must have a frame pointer.
The code in X86TargetLowering::LowerEH_RETURN() assumes that a frame
pointer exists, but the frame pointer was forced by the presence of
llvm.eh.unwind.init which isn't guaranteed.

If llvm.eh.unwind.init is actually required in functions calling
eh.return (is it?), we should diagnose that instead of emitting bad
machine code.

This should fix the dragonegg-x86_64-linux-gcc-4.6-test bot.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158961 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-22 03:04:27 +00:00
Andrew Trick
e2b32bb20e ARM scheduling fix: don't guess at implicit operand latency.
This is a minor drive-by fix with no robust way to unit test.
As an example see neon-div.ll:
SU(16):   %Q8<def> = VMOVLsv4i32 %D17, pred:14, pred:%noreg, %Q8<imp-use,kill>
 val SU(1): Latency=2 Reg=%Q8
...should be latency=1

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158960 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-22 02:50:33 +00:00
Andrew Trick
ef2d9e59ab ARM scheduling fix: compute predicated implicit use properly.
Minor drive by fix to cleanup latency computation. Calling
getOperandLatency with a deliberately incorrect operand index does not
give you the latency you want.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158959 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-22 02:50:31 +00:00
Nick Lewycky
ffccd92310 Emit relocations for DW_AT_location entries on systems which need it. This is
a recommit of r127757. Fixes PR9493. Patch by Paul Robinson!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158957 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-22 01:25:12 +00:00
Lang Hames
e023141322 Rename -allow-excess-fp-precision flag to -fuse-fp-ops, and switch from a
boolean flag to an enum: { Fast, Standard, Strict } (default = Standard).

This option controls the creation by optimizations of fused FP ops that store
intermediate results in higher precision than IEEE allows (E.g. FMAs). The
behavior of this option is intended to match the behaviour specified by a
soon-to-be-introduced frontend flag: '-ffuse-fp-ops'.

Fast mode - allows formation of fused FP ops whenever they're profitable.

Standard mode - allow fusion only for 'blessed' FP ops. At present the only
blessed op is the fmuladd intrinsic. In the future more blessed ops may be
added.

Strict mode - allow fusion only if/when it can be proven that the excess
precision won't effect the result.

Note: This option only controls formation of fused ops by the optimizers.  Fused
operations that are explicitly requested (e.g. FMA via the llvm.fma.* intrinsic)
will always be honored, regardless of the value of this option.

Internally TargetOptions::AllowExcessFPPrecision has been replaced by
TargetOptions::AllowFPOpFusion.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158956 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-22 01:09:09 +00:00
Hal Finkel
070b8dba80 Convert the PPC backend to use the new FMA infrastructure.
The existing contraction patterns are replaced with fma/fneg.
Overall functionality should be the same.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158955 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-22 00:49:52 +00:00
Nuno Lopes
cd88efe516 fix whitespace in my last commit.
sorry for the churn :S  enough for today; going to sleep.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158953 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-22 00:29:58 +00:00
Nuno Lopes
eb7c6865cd remove extractMallocCallFromBitCast, since it was tailor maded for its sole user. Update GlobalOpt accordingly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158952 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-22 00:25:01 +00:00
Nuno Lopes
f1fb6c8369 instcombine: disable optimization of 'invoke null/undef'. I'll move this functionality to SimplifyCFG (since we cannot make changes to the CFG here).
Fixes the crashes with the attached test case

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158951 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-21 23:52:14 +00:00
Michael J. Spencer
55eda324c4 [docs] Sphinxify GettingStartedVS. Patch by Mikael Lyngvig!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158947 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-21 23:27:09 +00:00
Evan Cheng
2a5422b1a6 Look pass zext to strength reduce an udiv. Patch by David Majnemer. rdar://11721329
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158946 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-21 22:52:49 +00:00
Arnaud A. de Grandmaison
5791df830d Remove trailing whitespaces
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158943 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-21 22:26:01 +00:00
NAKAMURA Takumi
f455101bad llvm/unittests: Simplify LINK_COMPONENTS.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158942 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-21 22:17:51 +00:00
NAKAMURA Takumi
c2270a48e3 llvm/unittests/VMCore/CMakeLists.txt: Introduce LLVM_OPTIONAL_SOURCES here, too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158941 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-21 22:17:39 +00:00
Jack Carter
4db98becf7 The inline asm operand modifier 'n' is suppose
to be generic across architectures. It has the
following description in the gnu sources:

    Negate the immediate constant

Several Architectures such as x86 have local implementations
of operand modifier 'n' which go beyond the above description
slightly. This won't affect them.

Affected files:

    lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
        Added 'n' to the switch cases.

    test/CodeGen/Generic/asm-large-immediate.ll
        Generic compiled test (x86 for me)

    test/CodeGen/Mips/asm-large-immediate.ll
        Mips compiled version of the generic one

Contributer: Jack Carter



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158939 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-21 21:37:54 +00:00
Nuno Lopes
2b3e958053 Add support for invoke to the MemoryBuiltin analysid.
Update comments accordingly.

Make instcombine remove useless invokes to C++'s 'new' allocation function (test attached).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158937 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-21 21:25:05 +00:00
Akira Hatanaka
54c5bc8799 1. fix null program output after some other changes
2. re-enable null.ll test
3. fix some minor style violations

Patch by Reed Kotler.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158935 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-21 20:39:10 +00:00
Akira Hatanaka
43d2ff1171 Add Mips to the list of target architectures for the MCJIT tests.
Patch by Reed Kotler.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158933 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-21 20:23:32 +00:00
Hal Finkel
2bbc9193b4 Treat TargetGlobalAddress as a constant for the purpose of matching pre-inc stores on PPC.
Thanks to Tobias von Koch for pointing out this problem.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158932 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-21 20:10:48 +00:00
Chandler Carruth
343c32a39c Avoid using the recently added APPEND_STRING feature. This should
restore support for CMake versions before 2.8.6 -- sorry for the
trouble!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158930 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-21 18:44:24 +00:00
Nuno Lopes
ef22f04bad fix build in C++11 mode.
Thanks to Chandler for pointing out the problem.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158928 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-21 18:38:26 +00:00
Pete Cooper
438c04027b Fix potential crash if DAGCombine on stores sees a half type
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158927 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-21 18:00:39 +00:00
Jack Carter
d5e11ad51a The inline asm operand modifier 'c' is suppose
to be generic across architectures. It has the
following description in the gnu sources:

    Substitute immediate value without immediate syntax

Several Architectures such as x86 have local implementations
of operand modifier 'c' which go beyond the above description
slightly. To make use of the generic modifiers without overriding
local implementation one can make a call to the base class method
for AsmPrinter::PrintAsmOperand() in the locally derived method's 
"default" case in the switch statement. That way if it is already
defined locally the generic version will never get called.

This change is needed when test/CodeGen/generic/asm-large-immediate.ll
failed on a native Mips board. The test was assuming a generic
implementation was in place.

Affected files:

    lib/Target/Mips/MipsAsmPrinter.cpp:
        Changed the default case to call the base method.
    lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
        Added 'c' to the switch cases.
    test/CodeGen/Mips/asm-large-immediate.ll
        Mips compiled version of the generic one

Contributer: Jack Carter



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158925 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-21 17:14:46 +00:00
Nuno Lopes
10cefaab3f move some typedefs so that we don't polute the llvm namespace. this should appease the GCC buildbots
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158924 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-21 16:58:41 +00:00
Nuno Lopes
034dd6c6a1 hopefully fix the buildbots: some tests have wrong definitions of malloc and were crashing this code on 64 bits machines
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158923 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-21 16:47:58 +00:00
Nuno Lopes
7f5847270a port the BoundsChecking patch to the new MemoryBuiltin API (i.e., remove most of the code from here).
Remove the alloc_size.ll test until we settle on a metadata format that makes everyone happy..

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158920 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-21 15:59:53 +00:00
Nuno Lopes
9e72a79ef4 refactor the MemoryBuiltin analysis:
- provide more extensive set of functions to detect library allocation functions (e.g., malloc, calloc, strdup, etc)
 - provide an API to compute the size and offset of an object pointed by

Move a few clients (GVN, AA, instcombine, ...) to the new API.
This implementation is a lot more aggressive than each of the custom implementations being replaced.

Patch reviewed by Nick Lewycky and Chandler Carruth, thanks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158919 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-21 15:45:28 +00:00
Nadav Rotem
2114a8aaba Add a number of threshold arguments to the SRA pass.
A patch by Tom Stellard with minor changes.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158918 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-21 13:44:31 +00:00
NAKAMURA Takumi
e42e9ce20f Revert r158209, "test/CodeGen/Generic/APIntLoadStore.ll: Mark as XFAIL:ppc since r157911."
It passes according to ppc changes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158917 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-21 13:43:06 +00:00
NAKAMURA Takumi
31f97a322b llvm/unittests/ExecutionEngine/JIT/CMakeLists.txt: Unbreak build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158914 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-21 12:44:58 +00:00
Chandler Carruth
bd9060c5c0 Add a pragma to supress an MSVC warning on some of the absurd code I'm
using to test the alignment support library.

Patch from Nikola on IRC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158912 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-21 10:02:41 +00:00
Chandler Carruth
53afd08bd1 Add some missing dependencies here that I missed in my first pass
through. Also sort them.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158911 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-21 10:02:40 +00:00
Chandler Carruth
7c888eee47 Completely refactor the structuring of unittest CMake files to match the
Makefiles, the CMake files in every other part of the LLVM tree, and
sanity.

This should also restore the output tree structure of all the unit
tests, sorry for breaking that, and thanks for letting me know.

The fundamental change is to put a CMakeLists.txt file in the unittest
directory, with a single test binary produced from it. This has several
advantages:

- No more weird directory stripping in the unittest macro, allowing it
  to be used more readily in other projects.
- No more directory prefixes on all the source files.
- Allows correct and precise use of LLVM's per-directory dependency
  system.
- Allows use of the checking logic for source files that have not been
  added to the CMake build. This uncovered a file being skipped with
  CMake in LLVM and one in Clang's unit tests.
- Makes Specifying conditional compilation or other custom logic for JIT
  tests easier.

It did require adding the concept of an explicit 'optional' source file
to the CMake build so that the missing-file check can skip cases where
the file is *supposed* to be missing. =]

This is another chunk of refactoring the CMake build in order to make it
usable for other clients like CompilerRT / ASan / TSan.

Note that this is interdependent with a Clang CMake change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158909 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-21 09:51:26 +00:00