1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 12:02:58 +02:00
Commit Graph

124816 Commits

Author SHA1 Message Date
Philip Reames
b28303ef74 [PassManager] Tuning Memory Usage of AnalysisUsage
We were using unneccessarily large initial sizes for these SmallVectors.  This was wasting around 50kb of memory for the O3 pipeline, even after the uniquing changes.  We're still using around 20kb which is a bit much, but it's definitely better.  This is about a 6% improvement in total O3 memory usage.

Note: The raw data on structure size which were used to pick these thresholds can be found in the review thread.

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

llvm-svn: 254974
2015-12-08 00:10:56 +00:00
Sanjay Patel
29d543a5b4 fix return values to match bool return type; NFC
llvm-svn: 254968
2015-12-07 23:34:30 +00:00
Rafael Espindola
735500f8f1 Factor two calls to a common location.
llvm-svn: 254967
2015-12-07 23:32:39 +00:00
NAKAMURA Takumi
b89e7fef9d Stabilize llvm/test/Object/archive-update.test a bit.
A manipulation (in this case, mkdir) can make slack between creating and touching %t.older/evenlen.

I would make this rewrote with python if this were still unstable.

llvm-svn: 254965
2015-12-07 23:15:57 +00:00
Justin Bogner
8b4ea7a451 Support: Teach Asan about BumpPtrAllocator
Based on patch by Pete Cooper.

llvm-svn: 254964
2015-12-07 23:12:26 +00:00
NAKAMURA Takumi
af1e01a62f Let llvm-lto installed. A few tests in clang/test are using it.
llvm-svn: 254963
2015-12-07 23:07:16 +00:00
Philip Reames
381030710c Remove debug output that snuck into 254957
llvm-svn: 254960
2015-12-07 22:43:56 +00:00
Philip Reames
b342730bfb Reapply 254950 w/fix
254950 ended up being not NFC.  The previous code was overriding the flags for whether an instruction read or wrote memory using the target specific flags returned via TTI.  I'd missed this in my refactoring.  Since I mistakenly built only x86 and didn't notice the number of unsupported tests, I didn't catch that before the original checkin.

This raises an interesting issue though.  Given we have function attributes (i.e. readonly, readnone, argmemonly) which describe the aliasing of intrinsics, why does TTI have this information overriding the instruction definition at all?  I see no reason for this, but decided to preserve existing behavior for the moment.  The root issue might be that we don't have a "writeonly" attribute.

Original commit message:
[EarlyCSE] Simplify and invert ParseMemoryInst [NFCI]

Restructure ParseMemoryInst - which was introduced to abstract over target specific load and stores instructions - to just query the underlying instructions. In theory, this could be slightly slower than caching the results, but in practice, it's very unlikely to be measurable.

The simple query scheme makes it far easier to understand, and much easier to extend with new queries. Given I'm about to need to add new query types, doing the cleanup first seemed worthwhile.

Do we still believe the target specific intrinsic handling is worthwhile in EarlyCSE? It adds quite a bit of complexity and makes the code harder to read. Being able to delete the abstraction entirely would be wonderful.

llvm-svn: 254957
2015-12-07 22:41:23 +00:00
Mehdi Amini
87b7d8abe9 Remove useless hack that avoids calling LLVMLinkInInterpreter()
This is supposed to force-link the Interpreter, by inserting a dead
call to LLVMLinkInInterpreter().
Since it is actually an empty function, there is no reason for the
call to be dead.

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 254956
2015-12-07 22:27:19 +00:00
Philip Reames
be05ec0211 Revert 254950
It's causing test failures on AArch64.  Due to a bad build config on my part, I apparently wasn't running the tests I thought I was.

llvm-svn: 254954
2015-12-07 21:41:29 +00:00
Manman Ren
dacd6a7c5f Update doc for C++ TLS calling convention.
llvm-svn: 254953
2015-12-07 21:40:09 +00:00
Rafael Espindola
b67b3b7c85 Simplify the error handling a bit. NFC.
llvm-svn: 254952
2015-12-07 21:28:22 +00:00
Philip Reames
db73a336d2 [EarlyCSE] Simplify and invert ParseMemoryInst [NFCI]
Restructure ParseMemoryInst - which was introduced to abstract over target specific load and stores instructions - to just query the underlying instructions. In theory, this could be slightly slower than caching the results, but in practice, it's very unlikely to be measurable.

The simple query scheme makes it far easier to understand, and much easier to extend with new queries. Given I'm about to need to add new query types, doing the cleanup first seemed worthwhile.

Do we still believe the target specific intrinsic handling is worthwhile in EarlyCSE? It adds quite a bit of complexity and makes the code harder to read. Being able to delete the abstraction entirely would be wonderful.

llvm-svn: 254950
2015-12-07 21:27:15 +00:00
Easwaran Raman
021e327ee7 Use updated threshold for indirect call bonus
When considering foo->bar inlining, if there is an indirect call in foo which gets resolved to a direct call (say baz), then we try to inline baz into bar with a threshold T and subtract max(T - Cost(bar->baz), 0) from Cost(foo->bar). This patch uses max(Threshold(bar->baz) - Cost(bar->baz)) instead, where Thresheld(bar->baz) could be different from T due to bonuses or subtractions. Threshold(bar->baz) - Cost(bar->baz) better represents the desirability of inlining baz into bar.

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

llvm-svn: 254945
2015-12-07 21:21:20 +00:00
Kit Barton
d8708a5236 [PPC64] Convert bool literals to i32
Convert i1 values to i32 values if they should be allocated in GPRs instead of CRs.

Phabricator: http://reviews.llvm.org/D14064
llvm-svn: 254942
2015-12-07 20:50:29 +00:00
Simon Pilgrim
c5e25856f0 Fix line endings
llvm-svn: 254939
2015-12-07 20:36:00 +00:00
Teresa Johnson
335927a217 Fix function return type in declaration (bot errors from r254926).
Try to fix bot build errors from r254926 by correcting the function
return type.

llvm-svn: 254934
2015-12-07 19:53:38 +00:00
Sanjay Patel
5542b087f9 don't repeat function names in comments; NFC
llvm-svn: 254930
2015-12-07 19:31:34 +00:00
Sanjay Patel
51a4d88a44 fix 'the the '; NFC
llvm-svn: 254928
2015-12-07 19:21:39 +00:00
Teresa Johnson
1fb89d62fb [ThinLTO] Support for specifying function index from pass manager
Summary:
Add a field on the PassManagerBuilder that clang or gold can use to pass
down a pointer to the function index in memory to use for importing when
the ThinLTO backend is triggered. Add support to supply this to the
function import pass.

Reviewers: joker.eph, dexonsmith

Subscribers: davidxl, llvm-commits, joker.eph

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

llvm-svn: 254926
2015-12-07 19:21:11 +00:00
Sanjay Patel
07306ac117 remove redundant check: optForSize() includes a check for the minsize attribute; NFCI
llvm-svn: 254925
2015-12-07 19:13:40 +00:00
Ron Lieberman
052c761243 [Hexagon] Adding v60 test, vasr in particular.
llvm-svn: 254923
2015-12-07 18:52:39 +00:00
David Blaikie
626fda51d2 [llvm-dwp] Restructure inputs for test case so they're all grouped together
llvm-svn: 254922
2015-12-07 18:46:41 +00:00
Sanjay Patel
80ab32e0ba 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.

llvm-svn: 254920
2015-12-07 17:39:48 +00:00
Lang Hames
096bda3427 [Orc] Removing traces of takeOwnershipOfBuffers left after r251560.
Patch by Joshua Gerrard. Thanks Joshua!

llvm-svn: 254919
2015-12-07 17:35:56 +00:00
Rafael Espindola
1d4a6cc6f5 Link declaration lazily.
We already linked available_externally and linkonce lazily, this just
adds declarations to the list.

llvm-svn: 254917
2015-12-07 16:31:41 +00:00
Rafael Espindola
cb7cc8867c Simplify test.
llvm-svn: 254916
2015-12-07 16:01:40 +00:00
Aaron Ballman
96865a146b 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.)

llvm-svn: 254915
2015-12-07 15:44:34 +00:00
Teresa Johnson
4789ea589d [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.

llvm-svn: 254914
2015-12-07 15:05:44 +00:00
Elena Demikhovsky
80454cacaf 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

llvm-svn: 254913
2015-12-07 14:33:34 +00:00
Artyom Skrobov
7d688d27a7 [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

llvm-svn: 254912
2015-12-07 14:22:39 +00:00
Daniel Sanders
b74cf30c85 [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

llvm-svn: 254911
2015-12-07 14:12:44 +00:00
Elena Demikhovsky
4e301fd23f 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

llvm-svn: 254909
2015-12-07 13:39:24 +00:00
Igor Breger
2e5da39635 AVX-512: implement kunpck intrinsics.
Differential Revision: http://reviews.llvm.org/D14821

llvm-svn: 254908
2015-12-07 13:25:18 +00:00
Rafael Espindola
f776a4d852 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.

llvm-svn: 254907
2015-12-07 13:24:23 +00:00
Asaf Badouh
201b9ca305 [avx512] rename gcc intrinsics to be align with gcc format
rename the gcc intrinsics suffix : _mask ->_round

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

llvm-svn: 254905
2015-12-07 13:14:14 +00:00
Marina Yatsina
905f6d3542 [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

llvm-svn: 254904
2015-12-07 13:09:20 +00:00
Bradley Smith
649bad1e83 [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.

llvm-svn: 254900
2015-12-07 10:54:36 +00:00
Simon Pilgrim
788a64f79f [X86][AVX] Added tests to load+broadcast non-zero'th vector elements
Baseline for an upcoming patch for PR23022

llvm-svn: 254898
2015-12-07 09:09:54 +00:00
Zlatko Buljan
9f18e49b16 [mips][microMIPS] Implement LH, LHE, LHU and LHUE instructions
Differential Revision: http://reviews.llvm.org/D9824

llvm-svn: 254897
2015-12-07 08:29:31 +00:00
Craig Topper
6d9821a6ce Add uint8_t size to LegalizeTypeAction enum and use the enum type directly to remove some typecasts. NFC
llvm-svn: 254895
2015-12-07 06:31:41 +00:00
Craig Topper
2d42dff673 Add uint8_t size to LegalizeAction enum so we can use the enum type directly and remove some casts. NFC
llvm-svn: 254893
2015-12-07 06:01:51 +00:00
Davide Italiano
cba3a5e757 [llvm-objdump/MachoDump] Make code much more concise.
llvm-svn: 254888
2015-12-07 00:03:28 +00:00
Keno Fischer
0efdadb478 [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

llvm-svn: 254887
2015-12-06 23:05:38 +00:00
Simon Pilgrim
25d3ec1f9d [X86][AVX] Tidied up BROADCASTPD/BROADCASTPS tests
Regenerate tests using update_llc_test_checks.py

llvm-svn: 254886
2015-12-06 20:12:19 +00:00
Lang Hames
dde8f900ec [Orc] Rename IndirectStubsManagerBase to IndirectStubsManager.
No functional change.

llvm-svn: 254885
2015-12-06 19:44:45 +00:00
Dan Gohman
719b162fe5 [WebAssembly] Factor out a TypeToString function, since we need it in multiple places.
llvm-svn: 254884
2015-12-06 19:42:29 +00:00
Dan Gohman
9544cca1f1 [WebAssembly] Make tableswitch's 'default' operand explicit. NFC.
llvm-svn: 254883
2015-12-06 19:34:57 +00:00
Dan Gohman
69c654121a [WebAssembly] Enable folding of offsets into global variable addresses.
llvm-svn: 254882
2015-12-06 19:33:32 +00:00
Dan Gohman
c4daa74a44 [WebAssembly] Tighten up some testcase regular expressions.
llvm-svn: 254881
2015-12-06 19:31:44 +00:00