Commit Graph

109727 Commits

Author SHA1 Message Date
Andrea Di Biagio
c270e8abbe [X86] Add 'FeatureSlowSHLD' to cpu 'bdver3'. Also explicit set FeatureAVX and FeatureSSE4A for all the bdver* cpus.
This patch adds 'FeatureSlowSHLD' to 'bdver3'.
According to the official AMD optimization guide for amdfam15: "Using
alternative code in place of SHLD achieves lower overall latency and
requires fewer execution resources. The 32-bit and 64-bit forms of
ADD, ADC, SHR, and LEA (except 16-bit form) are DirectPath
instructions, while SHLD is a VectorPath instruction."

This patch also explicitly sets feature AVX and SSE4A for all the bdver*
cpus. This part of the patch is a non-functional change and it is mainly
done for clarity reasons (Both XOP and FMA4 already imply AVX and SSE4A).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221296 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-04 21:18:09 +00:00
Justin Bogner
d2d9ad0d66 ErrorOr: Be more explicit in the implicit conversion to bool docs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221295 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-04 21:01:48 +00:00
Arnaud A. de Grandmaison
e1bec75134 [PBQP] Callee saved regs should have a higher cost than scratch regs
Registers are not all equal. Some are not allocatable (infinite cost),
some have to be preserved but can be used, and some others are just free
to use.

Ensure there is a cost hierarchy reflecting this fact, so that the
allocator will favor scratch registers over callee-saved registers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221293 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-04 20:51:29 +00:00
Arnaud A. de Grandmaison
8025a39d11 [PBQP] Tweak spill costs and coalescing benefits
This patch improves how the different costs (register, interference, spill
and coalescing) relates together. The assumption is now that:
 - coalescing (or any other "side effect" of reg alloc) is negative, and
   instead of being derived from a spill cost, they use the block
   frequency info.
 - spill costs are in the [MinSpillCost:+inf( range
 - register or interference costs are in [0.0:MinSpillCost( or +inf

The current MinSpillCost is set to 10.0, which is a random value high
enough that the current constraint builders do not need to worry about
when settings costs. It would however be worth adding a normalization
step for register and interference costs as the last step in the
constraint builder chain to ensure they are not greater than SpillMinCost
(unless this has some sense for some architectures). This would work well
with the current builder pipeline, where all costs are tweaked relatively
to each others, but could grow above MinSpillCost if the pipeline is
deep enough.

The current heuristic is tuned to depend rather on the number of uses of
a live interval rather than a density of uses, as used by the greedy
allocator. This heuristic provides a few percent improvement on a number
of benchmarks (eembc, spec, ...) and will definitely need to change once
spill placement is implemented: the current spill placement is really
ineficient, so making the cost proportionnal to the number of use is a
clear win.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221292 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-04 20:51:24 +00:00
Matt Arsenault
e2463284fc R600/SI: Rename div_scale dest operands to match documentation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221291 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-04 20:29:20 +00:00
Benjamin Kramer
4844826c15 AArch64: Pattern match integer vector abs like we do on ARM.
This kind of pattern is emitted by the loop vectorizer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221289 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-04 20:10:06 +00:00
Kostya Serebryany
c45da43b26 [asan] [mips] changed ShadowOffset32 for systems having 16kb PageSize; patch by Kumar Sukhani
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221288 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-04 19:46:15 +00:00
Rafael Espindola
d21956e2ec Remove unused DisableRedZone option.
Patch by Steve King.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221282 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-04 18:18:52 +00:00
David Majnemer
e756ecfb0c InstSimplify: Fold a hasNoSignedWrap() call into a match() expression
No functionality change intended, it's just a little more concise.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221281 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-04 17:47:13 +00:00
David Majnemer
57269b02a8 InstSimplify: Fold a hasNoUnsignedWrap() call into a match() expression
No functionality change intended, it's just a little more concise.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221280 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-04 17:38:50 +00:00
Toma Tabacu
dd3894aa8f [mips] Improve support for the .set mips16/nomips16 assembler directives.
Summary:
Appropriately set/clear the FeatureBit for Mips16 when these assembler directives are used and also emit ".set nomips16" (previously, only ".set mips16" was being emitted).

These improvements allow for better testing of the .cpload/.cprestore assembler directives (which are not supposed to work when Mips16 is enabled).

Test Plan: The test is bare-bones because there are no MC tests for Mips16 instructions (there's only one, which checks that the Mips16 ELF header flag gets set), and that suggests to me that it has not been implemented yet in the IAS.

Reviewers: dsanders

Reviewed By: dsanders

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D5462

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221277 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-04 17:18:07 +00:00
Juergen Ributzka
d0de1a525d [Stackmaps] Make test less fragile. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221276 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-04 17:11:00 +00:00
Sanjay Patel
0bbad0131a remove function names from comments; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221274 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-04 16:27:42 +00:00
Sanjay Patel
f1ab807a2b fix typo in comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221273 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-04 16:09:50 +00:00
NAKAMURA Takumi
58cb7beb66 Disable 3 tests in llvm/test/Transforms/GCOVProfiling/ for now. Investigating.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221270 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-04 14:41:53 +00:00
NAKAMURA Takumi
76614e7991 Remove "REQUIRES:shell" from tests. They work for me.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221269 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-04 13:41:33 +00:00
Simon Atanasyan
f7f14da355 [yaml2obj] Allow yaml2obj tool to recognize EF_MIPS_NAN2008 flag
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221268 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-04 13:33:36 +00:00
NAKAMURA Takumi
12fcb9cf0d Re-enable tests in llvm/test/Object, corresponding to line_iterator's
change in r221153.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221265 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-04 13:19:29 +00:00
NAKAMURA Takumi
992662c0ad llvm/test/Transforms/GCOVProfiling/linezero.ll: Use %/T instead of %T in regex. This works on win32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221262 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-04 13:00:48 +00:00
Rafael Espindola
5dac5bd225 Remove FindProgramByName. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221258 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-04 12:35:47 +00:00
Yaron Keren
3f4bf44b1c Fix Visual C++ warning, Program.inc(85): warning C4018: '<' : signed/unsigned mismatch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221252 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-04 09:22:41 +00:00
Charlie Turner
8f5dab8bb5 Add missing tests for build attribute encodings in object files.
test/MC/ARM/directive-eabi_attribute.s was missing several tests of object file
encodings relative to the existing tests for assembly file encodings. This
commit adds the missing tests.

Change-Id: Ie110ca02b65e8f4d4c77f437bd09d03607fa5c0d

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221250 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-04 09:07:40 +00:00
David Majnemer
3aeca77385 llvm-objdump: Pass DiceTableEntry by reference
DiceTableEntry is 24 bytes on my machine, it's probably better to pass
them by reference.

This fixes PR21464.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221247 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-04 08:41:48 +00:00
NAKAMURA Takumi
8f129a446d sys::findProgramByName(): [Win32] Tweak to pass lowercase .exe to SearchPath() to appease clang Driver's tests.
It seems SearchPath() doesn't show actual extension on the filesystem.

FIXME: Shall we use FindFirstFile() here?

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221246 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-04 08:17:15 +00:00
David Majnemer
ab15115ee0 CodeGen: Enable DWARF emission for MS ABI targets
This is experimental, just barely enough to get things to not
immediately combust.

A note for those who are curious:
Only lld can successfully link the object files, other linkers truncate
the section names making the debug sections illegible to debuggers.

Even with this in mind, we believe we are having trouble with SECREL
relocations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221245 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-04 08:03:31 +00:00
Yaron Keren
60234de3b5 #include <winbase.h> is not enough for Visual C++ 2013, it errors:
1>C:\Program Files (x86)\Windows Kits\8.1\Include\um\minwinbase.h(46):
error C2146: syntax error : missing ';' before identifier 'nLength'
1>C:\Program Files (x86)\Windows Kits\8.1\Include\um\minwinbase.h(46):
error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
...

including <windows.h> is actually required.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221244 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-04 07:53:30 +00:00
David Majnemer
281fc1721b test: Restore llvm-lit (at least for my machine)
r221137 feeds None into os.path.join which is not valid.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221242 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-04 05:54:50 +00:00
David Majnemer
229e959cd6 Minimize test case further
No functional change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221237 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-04 05:17:58 +00:00
NAKAMURA Takumi
ccf2cd179b R600/LLVMBuild.txt: Add TransformUtils.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221228 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-04 02:16:53 +00:00
Tim Northover
0a1d0f444b Docs: give binutils/gold instructions for CMake too.
Patch by Steve King.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221227 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-04 02:16:03 +00:00
Reid Kleckner
9d18e626cc Revert "Transforms: reapply SVN r219899"
This reverts commit r220811 and r220839. It made an incorrect change to
musttail handling.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221226 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-04 02:02:14 +00:00
Mark Heffernan
f4b76be936 Remove setPreservesCFG from instcombine. The pass, in particular, does not
preserve LoopSimplify because instcombine may replace branch predicates
with undef which loop simplify then replaces with always exit.  Replace
setPreservesCFG with the more constrained preservation of DomTree and
LoopInfo.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221223 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-04 01:51:01 +00:00
Michael J. Spencer
58206dd147 Use findProgramByName.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221221 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-04 01:29:59 +00:00
Michael J. Spencer
376a2e104f [Support][Program] Add findProgramByName(Name, OptionalPaths)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221220 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-04 01:29:29 +00:00
Reid Kleckner
9dfa407dc9 Use the LLVM_GNUC_PREREQ macro instead of the longhand version check
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221219 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-04 01:28:33 +00:00
Reid Kleckner
1bf7f442aa Remove the END_WITH_NULL macro now that Clang doesn't use it
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221218 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-04 01:15:53 +00:00
Kevin Enderby
957d027c5e Remove the static version of getScatteredRelocationType() now that r221211 added
a public version MachOObjectFile::getScatteredRelocationType().

This should fix the build bot for the unused function error.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221216 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-04 01:12:39 +00:00
Reid Kleckner
d282ca71b0 Rename END_WITH_NULL to LLVM_END_WITH_NULL and move to Compiler.h
We shouldn't put this kind of attribute stuff in DataTypes.h.

Leave the END_WITH_NULL name for now so I can update clang without
making build spam.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221215 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-04 01:12:21 +00:00
Sanjoy Das
67bcf74b14 The patchpoint lowering logic would crash with live constants equal to
the tombstone or empty keys of a DenseMap<int64_t, T>.  This patch
fixes the issue (and adds a tests case).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221214 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-04 00:59:21 +00:00
Kevin Enderby
a25032214d Add the code and test cases for 32-bit Intel to llvm-objdump’s Mach-O symbolizer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221211 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-04 00:43:16 +00:00
Colin LeMahieu
38d3e4d5d8 [Hexagon] Reverting 220584 to address ASAN errors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221210 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-04 00:14:36 +00:00
Sanjoy Das
60c2a98db4 Change logic in StackMaps::recordStackMapOpers to use the isInt<32>
predicate instead of bitwise operations.

This is not a functional change.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221209 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-04 00:06:57 +00:00
Akira Hatanaka
abe09fce79 Rename variables to conform to llvm coding standards.
Differential Revision: http://reviews.llvm.org/D6062


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221204 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-03 23:24:10 +00:00
Hal Finkel
cd9acde7f3 Use AA in LoadCombine
LoadCombine can be smarter about aborting when a writing instruction is
encountered, instead of aborting upon encountering any writing instruction, use
an AliasSetTracker, and only abort when encountering some write that might
alias with the loads that could potentially be combined.

This was originally motivated by comments made (and a test case provided) by
David Majnemer in response to PR21448. It turned out that LoadCombine was not
responsible for that PR, but LoadCombine should also be improved so that
unrelated stores (and @llvm.assume) don't interrupt load combining.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221203 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-03 23:19:16 +00:00
David Blaikie
42090c633f Use common range handling for the CU's ranges
This generalizes the range handling for ranges in both the skeleton and
full unit, laying the foundation for the addition of more ranges (rather
than just the CU's special case) in the skeleton CU with fission+gmlt.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221202 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-03 23:10:59 +00:00
Akira Hatanaka
85a5ac00e0 [AArch64] Make function processLogicalImmediate more efficient. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221199 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-03 23:06:31 +00:00
Rafael Espindola
3ada4ec04c Handle ASAN_OPTIONS and UBSAN_OPTIONS in TestingConfig.py
Currently they are passed to tests of llvm itself, but not, for example, lld.

With this patch the options are visible in every test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221198 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-03 23:04:56 +00:00
Rafael Espindola
86156e8997 refactor duplicated code. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221191 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-03 22:17:49 +00:00
David Majnemer
c671375e8e InstCombine: Remove infinite loop caused by FoldOpIntoPhi
FoldOpIntoPhi could create an infinite loop if the PHI could potentially
reach a BB it was considering inserting instructions into.  The
instructions it would insert would eventually lead to other combines
firing which would, again, lead to FoldOpIntoPhi firing.

The solution is to handicap FoldOpIntoPhi so that it doesn't attempt to
insert instructions that the PHI might reach.

This fixes PR21377.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221187 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-03 21:55:12 +00:00
David Blaikie
fcd4288009 Push the CURangeList down into the skeleton CU (where available) rather than the full CU
So that it may be shared between skeleton/full compile unit, for CU
ranges and other ranges to be added for fission+gmlt.

(at some point we might want some kind of object shared between the
skeleton and full compile units for all those things we only want one of
in that scope, rather than having the full unit always look through to
the skeleton... - alternatively, we might be able to have the skeleton
pointer (or another, separate pointer) point to the skeleton or to the
unit itself in non-fission, so we don't have to special case its
absence)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221186 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-03 21:52:56 +00:00