oota-llvm.git
8 years ago[Hexagon] Adding v60 test, vasr in particular.
Ron Lieberman [Mon, 7 Dec 2015 18:52:39 +0000 (18:52 +0000)]
[Hexagon] Adding v60 test, vasr in particular.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254923 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[llvm-dwp] Restructure inputs for test case so they're all grouped together
David Blaikie [Mon, 7 Dec 2015 18:46:41 +0000 (18:46 +0000)]
[llvm-dwp] Restructure inputs for test case so they're all grouped together

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254922 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoTighten checks so we can see existing codegen
Sanjay Patel [Mon, 7 Dec 2015 17:39:48 +0000 (17:39 +0000)]
Tighten checks so we can see existing codegen

The 2-element vector case shows a surprising bug: we failed to
eliminate ops on undefs, so there are 4 fmax calls even though
there can only be 2 valid elements in the inputs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254920 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Orc] Removing traces of takeOwnershipOfBuffers left after r251560.
Lang Hames [Mon, 7 Dec 2015 17:35:56 +0000 (17:35 +0000)]
[Orc] Removing traces of takeOwnershipOfBuffers left after r251560.

Patch by Joshua Gerrard. Thanks Joshua!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254919 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoLink declaration lazily.
Rafael Espindola [Mon, 7 Dec 2015 16:31:41 +0000 (16:31 +0000)]
Link declaration lazily.

We already linked available_externally and linkonce lazily, this just
adds declarations to the list.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254917 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoSimplify test.
Rafael Espindola [Mon, 7 Dec 2015 16:01:40 +0000 (16:01 +0000)]
Simplify test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254916 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoSilence all C4592 warnings with MSVC 2015 Update 1. This warning produces false posit...
Aaron Ballman [Mon, 7 Dec 2015 15:44:34 +0000 (15:44 +0000)]
Silence all C4592 warnings with MSVC 2015 Update 1. This warning produces false positives that Microsoft says will be fixed in Update 2. Until this produces reliable diagnostics, it is safe to disable the diagnostic -- the compiler is not doing anything different than it previously did aside from issuing the diagnostic.

(Note, this silences at least one false positive in LLVM with FeatureBitset uses.)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254915 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[ThinLTO] Support cloning of temporary DILocation metadata
Teresa Johnson [Mon, 7 Dec 2015 15:05:44 +0000 (15:05 +0000)]
[ThinLTO] Support cloning of temporary DILocation metadata

This is needed to support linking of module-level metadata as a
postpass after function importing, where we will be leaving temporary
metadata on imported instructions until the postpass metadata import.

Also added unittest. Split from D14838.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254914 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoVX-512: Fixed a bug in FP logic operation lowering
Elena Demikhovsky [Mon, 7 Dec 2015 14:33:34 +0000 (14:33 +0000)]
VX-512: Fixed a bug in FP logic operation lowering

FP logic instructions are supported in DQ extension on AVX-512 target.
I use integer operations instead.
Added tests.
I also enabled FABS in this patch in order to check ANDPS.
The operations are FOR, FXOR, FAND, FANDN.
The instructions, that supported for 512-bit vector under DQ are:
VORPS/PD, VXORPS/PD, VANDPS/PD, FANDNPS/PD.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254913 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[ARM] Generate ABI_optimization_goals build attribute, as described in the ARM ARM.
Artyom Skrobov [Mon, 7 Dec 2015 14:22:39 +0000 (14:22 +0000)]
[ARM] Generate ABI_optimization_goals build attribute, as described in the ARM ARM.

Summary: This reverts r254234, and adds a simple fix for the annoying case of use-after-free.

Reviewers: rengolin

Subscribers: aemerson, llvm-commits, rengolin

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254912 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[mips][ias] Removed DSP/DSPr2 instructions from base architecture valid-xfail.s's.
Daniel Sanders [Mon, 7 Dec 2015 14:12:44 +0000 (14:12 +0000)]
[mips][ias] Removed DSP/DSPr2 instructions from base architecture valid-xfail.s's.

Summary:
valid-xfail.s is for instructions that should be valid in the given ISA but
incorrectly fail. DSP/DSPr2 instructions are correct to fail since DSP/DSPr2 is
not enabled.

Reviewers: vkalintiris

Subscribers: dsanders, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254911 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAVX-512: Fixed masked load / store instruction selection for KNL.
Elena Demikhovsky [Mon, 7 Dec 2015 13:39:24 +0000 (13:39 +0000)]
AVX-512: Fixed masked load / store instruction selection for KNL.

Patterns were missing for KNL target for <8 x i32>, <8 x float> masked load/store.

This intrinsic comes with all legal types:
<8 x float> @llvm.masked.load.v8f32(<8 x float>* %addr, i32 align, <8 x i1> %mask, <8 x float> %passThru),
but still requires lowering, because VMASKMOVPS, VMASKMOVDQU32 work with 512-bit vectors only.

All data operands should be widened to 512-bit vector.
The mask operand should be widened to v16i1 with zeroes.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254909 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAVX-512: implement kunpck intrinsics.
Igor Breger [Mon, 7 Dec 2015 13:25:18 +0000 (13:25 +0000)]
AVX-512: implement kunpck intrinsics.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254908 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoChange how the linker handles the old llvm.global_ctors.
Rafael Espindola [Mon, 7 Dec 2015 13:24:23 +0000 (13:24 +0000)]
Change how the linker handles the old llvm.global_ctors.

Now instead of changing it to the new format and then linking, it just
handles the old format while copying it over.

The main differences are:

* There is no rauw in the source module.
* An old format input is always upgraded.

The first item helps with having a sane API that passes in a GV list to
the linker.

The second one is a small step in deprecating the old format.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254907 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[avx512] rename gcc intrinsics to be align with gcc format
Asaf Badouh [Mon, 7 Dec 2015 13:14:14 +0000 (13:14 +0000)]
[avx512] rename gcc intrinsics to be align with gcc format
rename the gcc intrinsics suffix : _mask ->_round

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254905 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86] Adding support for FWORD type for MS inline asm
Marina Yatsina [Mon, 7 Dec 2015 13:09:20 +0000 (13:09 +0000)]
[X86]  Adding support for FWORD type for MS inline asm

Adding support for FWORD type for MS inline asm.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254904 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[ARM] Flag vcvt{t,b} with an f16 type specifier as part of the FP16 extension
Bradley Smith [Mon, 7 Dec 2015 10:54:36 +0000 (10:54 +0000)]
[ARM] Flag vcvt{t,b} with an f16 type specifier as part of the FP16 extension

Additionally correct the Cortex-R7 definition to allow the FP16 feature.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254900 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86][AVX] Added tests to load+broadcast non-zero'th vector elements
Simon Pilgrim [Mon, 7 Dec 2015 09:09:54 +0000 (09:09 +0000)]
[X86][AVX] Added tests to load+broadcast non-zero'th vector elements

Baseline for an upcoming patch for PR23022

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254898 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[mips][microMIPS] Implement LH, LHE, LHU and LHUE instructions
Zlatko Buljan [Mon, 7 Dec 2015 08:29:31 +0000 (08:29 +0000)]
[mips][microMIPS] Implement LH, LHE, LHU and LHUE instructions
Differential Revision: http://reviews.llvm.org/D9824

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254897 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAdd uint8_t size to LegalizeTypeAction enum and use the enum type directly to remove...
Craig Topper [Mon, 7 Dec 2015 06:31:41 +0000 (06:31 +0000)]
Add uint8_t size to LegalizeTypeAction enum and use the enum type directly to remove some typecasts. NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254895 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAdd uint8_t size to LegalizeAction enum so we can use the enum type directly and...
Craig Topper [Mon, 7 Dec 2015 06:01:51 +0000 (06:01 +0000)]
Add uint8_t size to LegalizeAction enum so we can use the enum type directly and remove some casts. NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254893 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[llvm-objdump/MachoDump] Make code much more concise.
Davide Italiano [Mon, 7 Dec 2015 00:03:28 +0000 (00:03 +0000)]
[llvm-objdump/MachoDump] Make code much more concise.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254888 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Verifier] Fix !dbg validation if Scope is the Subprogram
Keno Fischer [Sun, 6 Dec 2015 23:05:38 +0000 (23:05 +0000)]
[Verifier] Fix !dbg validation if Scope is the Subprogram

Summary:
We are inserting both Scope and SP into the Seen map and check whether
it was already there in which case we skip the validation (the idea
being that we already checked this Subprogram before). However,
if (Scope == SP) as MDNodes, then inserting the Scope, will trigger
the Seen check causing us to incorrectly not validate this !dbg
attachment. Fix this by not performing the SP Seen check if Scope == SP

Reviewers: pcc, dexonsmith, dblaikie

Subscribers: dblaikie, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254887 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86][AVX] Tidied up BROADCASTPD/BROADCASTPS tests
Simon Pilgrim [Sun, 6 Dec 2015 20:12:19 +0000 (20:12 +0000)]
[X86][AVX] Tidied up BROADCASTPD/BROADCASTPS tests

Regenerate tests using update_llc_test_checks.py

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254886 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Orc] Rename IndirectStubsManagerBase to IndirectStubsManager.
Lang Hames [Sun, 6 Dec 2015 19:44:45 +0000 (19:44 +0000)]
[Orc] Rename IndirectStubsManagerBase to IndirectStubsManager.

No functional change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254885 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[WebAssembly] Factor out a TypeToString function, since we need it in multiple places.
Dan Gohman [Sun, 6 Dec 2015 19:42:29 +0000 (19:42 +0000)]
[WebAssembly] Factor out a TypeToString function, since we need it in multiple places.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254884 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[WebAssembly] Make tableswitch's 'default' operand explicit. NFC.
Dan Gohman [Sun, 6 Dec 2015 19:34:57 +0000 (19:34 +0000)]
[WebAssembly] Make tableswitch's 'default' operand explicit. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254883 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[WebAssembly] Enable folding of offsets into global variable addresses.
Dan Gohman [Sun, 6 Dec 2015 19:33:32 +0000 (19:33 +0000)]
[WebAssembly] Enable folding of offsets into global variable addresses.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254882 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[WebAssembly] Tighten up some testcase regular expressions.
Dan Gohman [Sun, 6 Dec 2015 19:31:44 +0000 (19:31 +0000)]
[WebAssembly] Tighten up some testcase regular expressions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254881 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[WebAssembly] Add some more ideas to README.txt.
Dan Gohman [Sun, 6 Dec 2015 19:29:54 +0000 (19:29 +0000)]
[WebAssembly] Add some more ideas to README.txt.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254880 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[x86] add missing maxnum/minnum tests for 256-bit vectors
Sanjay Patel [Sun, 6 Dec 2015 18:05:12 +0000 (18:05 +0000)]
[x86] add missing maxnum/minnum tests for 256-bit vectors

Also, switch to x86-64 because once we can lower these to something
more reasonable, there will be less noise in the checks. And add
AVX runs because those will be different than SSE.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254879 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoCreate llvm.global_ctors in the new format.
Rafael Espindola [Sun, 6 Dec 2015 16:18:25 +0000 (16:18 +0000)]
Create llvm.global_ctors in the new format.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254878 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86] Add support for loopz, loopnz for Intel syntax
Marina Yatsina [Sun, 6 Dec 2015 15:31:47 +0000 (15:31 +0000)]
[X86]  Add support for loopz, loopnz for Intel syntax

According to x86 spec, loopz and loopnz should be supported for Intel syntax, where loopz is equivalent to loope and loopnz is equivalent to loopne.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254877 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86][AVX512] add vmovss/sd missing encoding
Asaf Badouh [Sun, 6 Dec 2015 13:26:56 +0000 (13:26 +0000)]
[X86][AVX512] add vmovss/sd missing encoding

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254875 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86] Always generate precise CFA adjustments.
Michael Kuperstein [Sun, 6 Dec 2015 13:06:20 +0000 (13:06 +0000)]
[X86] Always generate precise CFA adjustments.

This removes the code path that generate "synchronous" (only correct at call site) CFA.
We will probably want to re-introduce it once we are capable of emitting different
.eh_frame and .debug_frame sections.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254874 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAVX512: support AVX512BW Intrinsic in 32bit mode.
Igor Breger [Sun, 6 Dec 2015 11:35:18 +0000 (11:35 +0000)]
AVX512: support AVX512BW Intrinsic in 32bit mode.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254873 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoUse make_range to reduce mentions of iterator type. NFC
Craig Topper [Sun, 6 Dec 2015 05:08:07 +0000 (05:08 +0000)]
Use make_range to reduce mentions of iterator type. NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254872 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMinor formatting fix. NFC
Craig Topper [Sun, 6 Dec 2015 05:07:58 +0000 (05:07 +0000)]
Minor formatting fix. NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254871 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[InstCombine] Call getCmpPredicateForMinMax only with a valid SPF
Sanjoy Das [Sat, 5 Dec 2015 23:44:22 +0000 (23:44 +0000)]
[InstCombine] Call getCmpPredicateForMinMax only with a valid SPF

Summary:
There are `SelectPatternFlavor`s that don't represent min or max idioms,
and we should not be passing those to `getCmpPredicateForMinMax`.

Fixes PR25745.

Reviewers: majnemer

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254869 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[llvm-readobj] report_error() does not return, so we can simplify.
Davide Italiano [Sat, 5 Dec 2015 23:36:52 +0000 (23:36 +0000)]
[llvm-readobj] report_error() does not return, so we can simplify.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254868 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[WebAssembly] Don't perform the returned-argument optimization on constants.
Dan Gohman [Sat, 5 Dec 2015 22:12:39 +0000 (22:12 +0000)]
[WebAssembly] Don't perform the returned-argument optimization on constants.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254866 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[WebAssembly] Replace the fake JUMP_TABLE instruction with a def : Pat. NFC.
Dan Gohman [Sat, 5 Dec 2015 20:46:53 +0000 (20:46 +0000)]
[WebAssembly] Replace the fake JUMP_TABLE instruction with a def : Pat. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254864 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[WebAssembly] Implement direct calls to external symbols.
Dan Gohman [Sat, 5 Dec 2015 20:41:36 +0000 (20:41 +0000)]
[WebAssembly] Implement direct calls to external symbols.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254863 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAdd vector fmaxnum tests that correspond to the existing fminnum tests
Sanjay Patel [Sat, 5 Dec 2015 20:27:10 +0000 (20:27 +0000)]
Add vector fmaxnum tests that correspond to the existing fminnum tests

Note: missing 256-bit tests for min and max should also be added.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254862 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[WebAssembly] Support inline asm constraints of type i16 and similar.
Dan Gohman [Sat, 5 Dec 2015 20:03:44 +0000 (20:03 +0000)]
[WebAssembly] Support inline asm constraints of type i16 and similar.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254861 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agofix typo; NFC
Sanjay Patel [Sat, 5 Dec 2015 19:54:59 +0000 (19:54 +0000)]
fix typo; NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254860 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[WebAssembly] Update a stale comment. NFC.
Dan Gohman [Sat, 5 Dec 2015 19:43:19 +0000 (19:43 +0000)]
[WebAssembly] Update a stale comment. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254859 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoWebAssembly: improve readme, add placeholder for tests.
JF Bastien [Sat, 5 Dec 2015 19:36:33 +0000 (19:36 +0000)]
WebAssembly: improve readme, add placeholder for tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254857 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[WebAssembly] Move useAA() out of line to make it more convenient to experiment with.
Dan Gohman [Sat, 5 Dec 2015 19:27:18 +0000 (19:27 +0000)]
[WebAssembly] Move useAA() out of line to make it more convenient to experiment with.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254856 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[WebAssembly] Call TargetPassConfig base class functions in overriding functions.
Dan Gohman [Sat, 5 Dec 2015 19:24:17 +0000 (19:24 +0000)]
[WebAssembly] Call TargetPassConfig base class functions in overriding functions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254855 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[WebAssembly] Expand frem as a floating point library function.
Dan Gohman [Sat, 5 Dec 2015 19:15:57 +0000 (19:15 +0000)]
[WebAssembly] Expand frem as a floating point library function.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254854 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Hexagon] Don't call getNumImplicitDefs and then iterate over the count. getNumImplic...
Craig Topper [Sat, 5 Dec 2015 17:34:07 +0000 (17:34 +0000)]
[Hexagon] Don't call getNumImplicitDefs and then iterate over the count. getNumImplicitDefs contains a loop so its better to just loop over the null terminated implicit def list. NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254852 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[ASAN] Add doFinalization to reset state
Keno Fischer [Sat, 5 Dec 2015 14:42:34 +0000 (14:42 +0000)]
[ASAN] Add doFinalization to reset state

Summary: If the same pass manager is used for multiple modules ASAN
complains about GlobalsMD being initialized twice. Fix this by
resetting GlobalsMD in a new doFinalization method to allow this
use case.

Reviewers: kcc

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254851 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86][ADX] Added memory folding patterns and stack folding tests
Simon Pilgrim [Sat, 5 Dec 2015 07:27:50 +0000 (07:27 +0000)]
[X86][ADX] Added memory folding patterns and stack folding tests

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254844 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoReplace uint16_t with the MCPhysReg typedef in many places. A lot of physical registe...
Craig Topper [Sat, 5 Dec 2015 07:13:35 +0000 (07:13 +0000)]
Replace uint16_t with the MCPhysReg typedef in many places. A lot of physical register arrays already use this typedef.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254843 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoUse std::fill instead of memset to initialize an array to avoid hardcoded count and...
Craig Topper [Sat, 5 Dec 2015 07:13:25 +0000 (07:13 +0000)]
Use std::fill instead of memset to initialize an array to avoid hardcoded count and a multiply. The outputed code is identical.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254842 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86][FMA4] Explicitly set the domain of FMA4 float/double scalar instructions
Simon Pilgrim [Sat, 5 Dec 2015 07:07:42 +0000 (07:07 +0000)]
[X86][FMA4] Explicitly set the domain of FMA4 float/double scalar instructions

Both were defaulting to the float domain - now matches the packed instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254841 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[PGO] Add version to getPGOFuncName method
Xinliang David Li [Sat, 5 Dec 2015 05:16:36 +0000 (05:16 +0000)]
[PGO] Add version to getPGOFuncName method

Different version of indexed format may use different
name uniquing schemes for static functions. Pass the
version info to the name interface so that different
schmes can be picked (for profile lookup).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254838 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoNormalize successors' probabilities when building MBBs for jump table.
Cong Hou [Sat, 5 Dec 2015 05:00:55 +0000 (05:00 +0000)]
Normalize successors' probabilities when building MBBs for jump table.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254837 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[llvm-dwp] Add coverage for both the presence and absence of type units, and fix...
David Blaikie [Sat, 5 Dec 2015 03:41:53 +0000 (03:41 +0000)]
[llvm-dwp] Add coverage for both the presence and absence of type units, and fix/remove the emission of a broken tu_index when no type units are present

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254833 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[llvm-dwp] Fix the type_units.test since I renamed its inputs as well
David Blaikie [Sat, 5 Dec 2015 03:11:17 +0000 (03:11 +0000)]
[llvm-dwp] Fix the type_units.test since I renamed its inputs as well

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254830 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[llvm-dwp] Rename the sufficiently-modified test to reflect it's non-simplicity
David Blaikie [Sat, 5 Dec 2015 03:10:05 +0000 (03:10 +0000)]
[llvm-dwp] Rename the sufficiently-modified test to reflect it's non-simplicity

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254829 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[llvm-dwp] clang-format this to catch anything I've missed along the way
David Blaikie [Sat, 5 Dec 2015 03:06:30 +0000 (03:06 +0000)]
[llvm-dwp] clang-format this to catch anything I've missed along the way

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254828 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[llvm-dwp] Support debug_tu_index
David Blaikie [Sat, 5 Dec 2015 03:05:45 +0000 (03:05 +0000)]
[llvm-dwp] Support debug_tu_index

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254827 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[WebAssembly] Implement ReverseBranchCondition, and re-enable MachineBlockPlacement
Dan Gohman [Sat, 5 Dec 2015 03:03:35 +0000 (03:03 +0000)]
[WebAssembly] Implement ReverseBranchCondition, and re-enable MachineBlockPlacement

This patch introduces a codegen-only instruction currently named br_unless,
which makes it convenient to implement ReverseBranchCondition and re-enable
the MachineBlockPlacement pass. Then in a late pass, it lowers br_unless
back into br_if.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254826 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[libFuzzer] one more trophie
Kostya Serebryany [Sat, 5 Dec 2015 02:23:49 +0000 (02:23 +0000)]
[libFuzzer] one more trophie

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254825 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[libFuzzer] don't reload the corpus more than once every second
Kostya Serebryany [Sat, 5 Dec 2015 02:09:22 +0000 (02:09 +0000)]
[libFuzzer] don't reload the corpus more than once every second

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254824 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoWhitespace.
Lang Hames [Sat, 5 Dec 2015 01:44:20 +0000 (01:44 +0000)]
Whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254821 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[opt] Fix run-twice option for non-idempotent passes
Keno Fischer [Sat, 5 Dec 2015 01:38:12 +0000 (01:38 +0000)]
[opt] Fix run-twice option for non-idempotent passes

Cloning the module was supposed to guard against the possibility
that the passes may be non-idempotent. However, for some reason
I decided to put that AFTER the passes had already run on the
module, defeating the point entirely. Fix that by moving up the
CloneModule as is done in llc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254819 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[MC] Add a test for state reset in MCMachOStreamer
Keno Fischer [Sat, 5 Dec 2015 01:02:53 +0000 (01:02 +0000)]
[MC] Add a test for state reset in MCMachOStreamer

This was fixed in r254751, but untestable until r254774, which
added the necessary command line flag to llc. Add a test now
to make sure this doesn't regress again.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254814 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFix a typo in LoopVectorize.cpp. NFC.
Cong Hou [Sat, 5 Dec 2015 01:00:22 +0000 (01:00 +0000)]
Fix a typo in LoopVectorize.cpp. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254813 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[WebAssembly] Fix scheduling dependencies in register-stackified code
Dan Gohman [Sat, 5 Dec 2015 00:51:40 +0000 (00:51 +0000)]
[WebAssembly] Fix scheduling dependencies in register-stackified code

Add physical register defs to instructions used from stackified
instructions to prevent them from being scheduled into the middle of
a stack sequence. This is a conservative measure which may be loosened
in the future.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254811 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoCodeGen: Let the BumpPtrAllocator free the elements of indexList
Justin Bogner [Sat, 5 Dec 2015 00:39:14 +0000 (00:39 +0000)]
CodeGen: Let the BumpPtrAllocator free the elements of indexList

The indexList's nodes are all allocated on a BumpPtrAllocator, so it's
more efficient to let them be freed when it goes away, rather than
deleting them directly. This is a follow up to r254794.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254808 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[WebAssembly] Support constant offsets on loads and stores
Derek Schuff [Sat, 5 Dec 2015 00:26:39 +0000 (00:26 +0000)]
[WebAssembly] Support constant offsets on loads and stores

This is just prototype for load/store for i32 types. I'll add them to
the rest of the types if we like this direction.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254807 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[EarlyCSE] IsSimple vs IsVolatile naming clarification (NFC)
Philip Reames [Sat, 5 Dec 2015 00:18:33 +0000 (00:18 +0000)]
[EarlyCSE] IsSimple vs IsVolatile naming clarification (NFC)

When the notion of target specific memory intrinsics was introduced to EarlyCSE, the commit confused the notions of volatile and simple memory access.  Since I'm about to start working on this area, cleanup the naming so that patches aren't horribly confusing.  Note that the actual implementation was always bailing if the load or store wasn't simple.

Reminder:
- "volatile" - C++ volatile, can't remove any memory operations, but in principal unordered
- "ordered" - imposes ordering constraints on other nearby memory operations
- "atomic" - can't be split or sheared.  In LLVM terms, all "ordered" operations are also atomic so the predicate "isAtomic" is often used.
- "simple" - a load which is none of the above.  These are normal loads and what most of the optimizer works with.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254805 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[opt] Fix sanitizer complaints about r254774
Keno Fischer [Sat, 5 Dec 2015 00:06:37 +0000 (00:06 +0000)]
[opt] Fix sanitizer complaints about r254774

`Out` can be null if no output is requested, so move any access
to it inside the conditional. Thanks to Justin Bogner for finding
this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254804 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[PassManager] Ensure destructors of cached AnalysisUsage objects are run
Philip Reames [Fri, 4 Dec 2015 23:48:19 +0000 (23:48 +0000)]
[PassManager] Ensure destructors of cached AnalysisUsage objects are run

In 254760, I introduced the usage of a BumpPtrAllocator for the AnalysisUsage instances held by the PassManger.  This turns out to have been incorrect since a BumpPtrAllocator does not run the destructors of objects when deallocating memory.  Since a few of our SmallVector's had grown beyond their small size, we end up with some leaked memory.  We need to use a SpecificBumpPtrAllocator instead.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254803 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[ThinLTO] Helper for performing renaming/promotion on a module
Teresa Johnson [Fri, 4 Dec 2015 23:40:22 +0000 (23:40 +0000)]
[ThinLTO] Helper for performing renaming/promotion on a module

Creates a module and performs necessary renaming/promotion of locals
that may be exported to another module.

Split out of D15024.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254802 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAdd FeatureLAHFSAHF to amdfam10 as well.
Hans Wennborg [Fri, 4 Dec 2015 23:32:19 +0000 (23:32 +0000)]
Add FeatureLAHFSAHF to amdfam10 as well.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254801 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[WebAssembly] Initial varargs support.
Dan Gohman [Fri, 4 Dec 2015 23:22:35 +0000 (23:22 +0000)]
[WebAssembly] Initial varargs support.

Full varargs support will depend on prologue/epilogue support, but this patch
gets us started with most of the basic infrastructure.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254799 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAddress a memory leak in 254760
Philip Reames [Fri, 4 Dec 2015 23:06:33 +0000 (23:06 +0000)]
Address a memory leak in 254760

The issue appears to have been that the copy constructor of the SmallVector was being invoked and this was somehow leading to leaked memory.  This patch avoids the symptom, but likely doesn't address the underlying problem.  I'm still investigating the root cause, but wanted to avoid the memory leak in the mean time.  Even with the underlying fix, avoiding the redundant allocation is worthwhile.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254795 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoCodeGen: Move the SlotIndexes BumpPtrAllocator before the list it allocates
Justin Bogner [Fri, 4 Dec 2015 23:00:54 +0000 (23:00 +0000)]
CodeGen: Move the SlotIndexes BumpPtrAllocator before the list it allocates

When a `SlotIndexes` is destroyed, `ileAllocator` will currently be
destructed before `IndexList`, but all of `IndexList`'s storage has
been allocated by `ileAllocator`. This means we'll call destructors on
garbage data, which is very bad. This can be avoided by putting the
BumpPtrAllocator earlier in the class than anything it allocates.

Unfortunately, I don't know how to test this. It depends very much on
memory layout, and the only evidence I have that this is actually
happening in practice are backtraces that might be explained by this.
By inspection though, the code is obviously dangerous/wrong, and this
is the right thing to do.

I'll follow up later with a patch that calls clearAndLeakNodesUnsafely
on the list, since there isn't much point in destructing them when
they're allocated in a BPA anyway, but I figured it makes sense to
commit the correctness fix separately from that optimization.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254794 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoX86: Don't emit SAHF/LAHF for 64-bit targets unless explicitly supported
Hans Wennborg [Fri, 4 Dec 2015 23:00:33 +0000 (23:00 +0000)]
X86: Don't emit SAHF/LAHF for 64-bit targets unless explicitly supported

These instructions are not supported by all CPUs in 64-bit mode. Emitting them
causes Chromium to crash on start-up for users with such chips.

(GCC puts these instructions behind -msahf on 64-bit for the same reason.)

This patch adds FeatureLAHFSAHF, enables it by default for 32-bit targets
and modern CPUs, and changes X86InstrInfo::copyPhysReg back to the lowering
from before r244503 when the instructions are not available.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254793 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAdd TransformUtils to list of required libraries for llc
Derek Schuff [Fri, 4 Dec 2015 22:47:58 +0000 (22:47 +0000)]
Add TransformUtils to list of required libraries for llc

This dependency was added in r254774

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254786 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[libFuzzer] compute base64 in-process instead of using an external lib. Since libFuzz...
Kostya Serebryany [Fri, 4 Dec 2015 22:29:39 +0000 (22:29 +0000)]
[libFuzzer] compute base64 in-process instead of using an external lib. Since libFuzzer should not depend on anything, just re-implement base64 encoder. PR25746

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254784 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMSVC complains about this being ambiguous.
Rafael Espindola [Fri, 4 Dec 2015 22:26:21 +0000 (22:26 +0000)]
MSVC complains about this being ambiguous.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254782 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Orc] Move some code up into the JITCompileCallbackManager base class. NFC.
Lang Hames [Fri, 4 Dec 2015 22:09:19 +0000 (22:09 +0000)]
[Orc] Move some code up into the JITCompileCallbackManager base class. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254778 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAlways pass a diagnostic handler to the linker.
Rafael Espindola [Fri, 4 Dec 2015 22:08:53 +0000 (22:08 +0000)]
Always pass a diagnostic handler to the linker.

Before this patch the diagnostic handler was optional. If it was not
passed, the one in the LLVMContext was used.

That is probably not a pattern we want to follow. If each area has an
optional callback, there is a sea of callbacks and it is hard to follow
which one is called.

Doing this also found cases where the callback is a nice addition, like
testing that no errors or warnings are reported.

The other option is to always use the diagnostic handler in the
LLVMContext. That has a few problems

* To implement the C API we would have to set the diag handler and then
  set it back to the original value.
* Code that creates the context might be far away from code that wants
  the diagnostics.

I do have a patch that implements the second option and will send that as
an RFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254777 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[SimplifyLibCalls] Optimization for pow(x, n) where n is some constant
Weiming Zhao [Fri, 4 Dec 2015 22:00:47 +0000 (22:00 +0000)]
[SimplifyLibCalls] Optimization for pow(x, n) where n is some constant

Summary:
    In order to avoid calling pow function we generate repeated fmul when n is a
    positive or negative whole number.

    For each exponent we pre-compute Addition Chains in order to minimize the no.
    of fmuls.
    Refer: http://wwwhomes.uni-bielefeld.de/achim/addition_chain.html

    We pre-compute addition chains for exponents upto 32 (which results in a max of
    7 fmuls).

    For eg:
    4 = 2+2
    5 = 2+3
    6 = 3+3 and so on

    Hence,
    pow(x, 4.0) ==> y = fmul x, x
                    x = fmul y, y
                    ret x

    For negative exponents, we simply compute the reciprocal of the final result.

    Note: This transformation is only enabled under fast-math.

    Patch by Mandeep Singh Grang <mgrang@codeaurora.org>

Reviewers: weimingz, majnemer, escha, davide, scanon, joerg

Subscribers: probinson, escha, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254776 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFix incorrect quote. NFC
Pete Cooper [Fri, 4 Dec 2015 21:59:04 +0000 (21:59 +0000)]
Fix incorrect quote.  NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254775 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[llc/opt] Add an option to run all passes twice
Keno Fischer [Fri, 4 Dec 2015 21:56:46 +0000 (21:56 +0000)]
[llc/opt] Add an option to run all passes twice

Summary: Lately, I have submitted a number of patches to fix bugs that
only occurred when using the same pass manager to compile multiple
modules (generally these bugs are failure to reset some persistent
state). Unfortunately I don't think there is currently a way to test
that from the command line. This adds a very simple flag to both llc
and opt, under which the tools will simply re-run their respective
pass pipelines using the same pass manager on (a clone of the same
module). Additionally, we verify that both outputs are bitwise the
same.

Reviewers: yaron.keren

Subscribers: loladiro, yaron.keren, kcc, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254774 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[AArch64] Expand vector SDIVREM/UDIVREM operations.
Chad Rosier [Fri, 4 Dec 2015 21:38:44 +0000 (21:38 +0000)]
[AArch64] Expand vector SDIVREM/UDIVREM operations.

http://reviews.llvm.org/D15214
Patch by Ana Pazos <apazos@codeaurora.org>!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254773 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[llvm-dwp] Remove some out of date comments
David Blaikie [Fri, 4 Dec 2015 21:38:39 +0000 (21:38 +0000)]
[llvm-dwp] Remove some out of date comments

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254772 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[llvm-dwp] Implement the required on-disk probed hash table
David Blaikie [Fri, 4 Dec 2015 21:30:23 +0000 (21:30 +0000)]
[llvm-dwp] Implement the required on-disk probed hash table

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254770 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFix llvm-readobj build on Windows, match noreturn attribute on reportError in headers
Reid Kleckner [Fri, 4 Dec 2015 21:29:53 +0000 (21:29 +0000)]
Fix llvm-readobj build on Windows, match noreturn attribute on reportError in headers

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254769 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[llvm-dwp] Include the debug_line.dwo section
David Blaikie [Fri, 4 Dec 2015 21:16:42 +0000 (21:16 +0000)]
[llvm-dwp] Include the debug_line.dwo section

This probably shouldn't be generated in the .dwo file for CUs, only for
TUs, but it's in the sample .dwos (generated by clang) so dwp should
reflect that.

Arguably the DWP tool could be smart enough to know that the CUs
shouldn't need a debug_line.dwo section and skip that even when it's
legitimately generated for TUs, but that's a bit more off-book.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254767 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[OperandBundles] Allow operand-specific attributes in operand bundles
Sanjoy Das [Fri, 4 Dec 2015 20:34:37 +0000 (20:34 +0000)]
[OperandBundles] Allow operand-specific attributes in operand bundles

Currently `OperandBundleUse::operandsHaveAttr` computes its result
without being given a specific operand.  This is problematic because it
forces us to say that, e.g., even non-pointer operands in `"deopt"`
operand bundles are `readonly`, which doesn't make sense.

This commit changes `operandsHaveAttr` to work in the context of a
specific operand, so that we can give the operand attributes that make
sense for the operands's `llvm::Type`.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254764 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[LegacyPassManager] Reduce memory usage for AnalysisUsage
Philip Reames [Fri, 4 Dec 2015 20:05:04 +0000 (20:05 +0000)]
[LegacyPassManager] Reduce memory usage for AnalysisUsage

The LegacyPassManager was storing an instance of AnalysisUsage for each instance of each pass. In practice, most instances of a single pass class share the same dependencies. We can't rely on this because passes can (and some do) have dynamic dependencies based on instance options.

We can exploit the likely commonality by uniqueing the usage information after querying the pass, but before storing it into the pass manager. This greatly reduces memory consumption by the AnalysisUsage objects. For a long pass pipeline, I measured a decrease in memory consumption for this storage of about 50%. I have not measured on the default O3 pipeline, but I suspect it will see some benefit as well since many passes are repeated (e.g. InstCombine).

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254760 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoScheduleDAGInstrs: Move LiveIntervals field to ScheduleDAGMI
Matthias Braun [Fri, 4 Dec 2015 19:54:24 +0000 (19:54 +0000)]
ScheduleDAGInstrs: Move LiveIntervals field to ScheduleDAGMI

Now that ScheduleDAGInstrs doesn't need it anymore we can move the field
down the class hierarcy to ScheduleDAGMI.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254759 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[llvm-readobj] reportError() never returns. Mark with the correct attribute.
Davide Italiano [Fri, 4 Dec 2015 19:29:49 +0000 (19:29 +0000)]
[llvm-readobj] reportError() never returns. Mark with the correct attribute.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254752 91177308-0d34-0410-b5e6-96231b3b80d8