Rafael Espindola [Mon, 15 Jun 2015 21:04:27 +0000 (21:04 +0000)]
Don't indent inside a namespace. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239760
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 15 Jun 2015 21:02:49 +0000 (21:02 +0000)]
Replace @ with the more common \. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239759
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 15 Jun 2015 20:55:37 +0000 (20:55 +0000)]
Don't repeat names in comments and start functions with a lower case letter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239756
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Lorenz [Mon, 15 Jun 2015 20:30:22 +0000 (20:30 +0000)]
MIR Serialization: Connect the machine function analysis pass to the MIR parser.
This commit connects the machine function analysis pass (which creates machine
functions) to the MIR parser, which will initialize the machine functions
with the state from the MIR file and reconstruct the machine IR.
This commit introduces a new interface called 'MachineFunctionInitializer',
which can be used to provide custom initialization for the machine functions.
This commit also introduces a new diagnostic class called
'DiagnosticInfoMIRParser' which is used for MIR parsing errors.
This commit modifies the default diagnostic handling in LLVMContext - now the
the diagnostics are printed directly into llvm::errs() so that the MIR parsing
errors can be printed with colours.
Reviewers: Justin Bogner
Differential Revision: http://reviews.llvm.org/D9928
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239753
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Mon, 15 Jun 2015 20:16:53 +0000 (20:16 +0000)]
Remove duplicate conditional in if-stmt.
Fixes PR23839.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239751
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 15 Jun 2015 20:08:17 +0000 (20:08 +0000)]
Cleanup the constructor of BitcodeReader. NFC.
Use the same argument names as the members.
Use default member initializes.
Extracted from a patch by Karl Schimpf.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239749
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Mon, 15 Jun 2015 20:05:38 +0000 (20:05 +0000)]
Add "REQUIRES: asserts" to test case that uses -debug-only
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239748
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Mon, 15 Jun 2015 19:38:15 +0000 (19:38 +0000)]
Unbreak docs build from r239740.
Add FaultMaps.rst to toctree.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239747
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Mon, 15 Jun 2015 19:29:44 +0000 (19:29 +0000)]
Unbreak the build from r239740.
Do not re-use an enum name as a field name. Some bots don't like this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239746
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Mon, 15 Jun 2015 19:05:35 +0000 (19:05 +0000)]
[Hexagon] Moving pass declarations out of header and in to implementation files. Removing unused function getSubtargetInfo from HexagonMCCodeEmitter.cpp Removing deletion of copy construction and assignment operator since parent already deletes it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239744
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Mon, 15 Jun 2015 18:44:27 +0000 (18:44 +0000)]
[CodeGen] Add a pass to fold null checks into nearby memory operations.
Summary:
This change adds an "ImplicitNullChecks" target dependent pass. This
pass folds null checks into memory operation using the FAULTING_LOAD
pseudo-op introduced in previous patches.
Depends on D10197
Depends on D10199
Depends on D10200
Reviewers: reames, rnk, pgavlin, JosephTremoulet, atrick
Reviewed By: atrick
Subscribers: ab, JosephTremoulet, llvm-commits
Differential Revision: http://reviews.llvm.org/D10201
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239743
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Mon, 15 Jun 2015 18:44:21 +0000 (18:44 +0000)]
[TargetInstrInfo] Add new hook: AnalyzeBranchPredicate.
Summary:
NFC: no one uses AnalyzeBranchPredicate yet.
Add TargetInstrInfo::AnalyzeBranchPredicate and implement for x86. A
later change adding support for page-fault based implicit null checks
depends on this.
Reviewers: reames, ab, atrick
Reviewed By: atrick
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D10200
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239742
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Mon, 15 Jun 2015 18:44:14 +0000 (18:44 +0000)]
[TargetInstrInfo] Rename getLdStBaseRegImmOfs and implement for x86.
Summary:
TargetInstrInfo::getLdStBaseRegImmOfs to
TargetInstrInfo::getMemOpBaseRegImmOfs and implement for x86. The
implementation only handles a few easy cases now and will be made more
sophisticated in the future.
This is NFCI: the only user of `getLdStBaseRegImmOfs` (now
`getmemOpBaseRegImmOfs`) is `LoadClusterMotion` and `LoadClusterMotion`
is disabled for x86.
Reviewers: reames, ab, MatzeB, atrick
Reviewed By: MatzeB, atrick
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D10199
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239741
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Mon, 15 Jun 2015 18:44:08 +0000 (18:44 +0000)]
[CodeGen] Introduce a FAULTING_LOAD_OP pseudo-op.
Summary:
This instruction encodes a loading operation that may fault, and a label
to branch to if the load page-faults. The locations of potentially
faulting loads and their "handler" destinations are recorded in a
FaultMap section, meant to be consumed by LLVM's clients.
Nothing generates FAULTING_LOAD_OP instructions yet, but they will be
used in a future change.
The documentation (FaultMaps.rst) needs improvement and I will update
this diff with a more expanded version shortly.
Depends on D10196
Reviewers: rnk, reames, AndyAyers, ab, atrick, pgavlin
Reviewed By: atrick, pgavlin
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D10197
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239740
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Mon, 15 Jun 2015 18:44:01 +0000 (18:44 +0000)]
[NFC] Extract X86MCInstLower::LowerMachineOperand.
Summary: Refactoring-only change that will be used later.
Reviewers: reames, atrick
Reviewed By: atrick
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D10196
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239739
91177308-0d34-0410-b5e6-
96231b3b80d8
Yaron Keren [Mon, 15 Jun 2015 17:03:35 +0000 (17:03 +0000)]
De-duplicate common expression, NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239736
91177308-0d34-0410-b5e6-
96231b3b80d8
Yaron Keren [Mon, 15 Jun 2015 16:20:16 +0000 (16:20 +0000)]
Rangify several for loops, NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239733
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeny Astigeevich [Mon, 15 Jun 2015 15:48:44 +0000 (15:48 +0000)]
On behalf of Alexandros Lamprineas:
LLVM targeting aarch64 doesn't correctly produce aligned accesses for non-aligned
data at -O0/fast-isel (-mno-unaligned-access).
The root cause seems to be in fast-isel not producing unaligned access correctly
for -mno-unaligned-access.
The patch just aborts fast-isel for loads and stores when -mno-unaligned-access is
present.
The regression test is updated to check this new test case (-mno-unaligned-access
together with fast-isel).
Differential Revision: http://reviews.llvm.org/D10360
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239732
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Mon, 15 Jun 2015 15:42:26 +0000 (15:42 +0000)]
[LinkerTest] Use LLVMDisposeMessage to free error string.
LLVMDisposeMessage is just a thing wrapper around free at the moment, but it's
the proper API to use here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239731
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 15 Jun 2015 14:49:41 +0000 (14:49 +0000)]
Avoid a "always true" warning from gcc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239729
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 15 Jun 2015 13:36:27 +0000 (13:36 +0000)]
gold-plugin: save the .o when given -save-temps.
The plugin now save the bitcode before and after optimizations and the
.o that is passed to the linker.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239726
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Mon, 15 Jun 2015 10:34:38 +0000 (10:34 +0000)]
Revert r239721 - Replace string GNU Triples with llvm::Triple in InitMCObjectFileInfo. NFC.
It appears to cause sparc-little-endian.s to assert on Windows and Darwin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239724
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Mon, 15 Jun 2015 09:19:41 +0000 (09:19 +0000)]
Replace string GNU Triples with llvm::Triple in InitMCObjectFileInfo. NFC.
Summary:
This affects other tools so the previous C++ API has been retained as a
deprecated function for the moment. Clang has been updated with a trivial
patch (not covered by the pre-commit review) to avoid breaking -Werror builds.
Other in-tree tools will be fixed with similar trivial patches.
This continues the patch series to eliminate StringRef forms of GNU triples
from the internals of LLVM that began in r239036.
Reviewers: rengolin
Reviewed By: rengolin
Subscribers: llvm-commits, rengolin
Differential Revision: http://reviews.llvm.org/D10366
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239721
91177308-0d34-0410-b5e6-
96231b3b80d8
Arnaud A. de Grandmaison [Mon, 15 Jun 2015 09:09:06 +0000 (09:09 +0000)]
[MachineSink] Improve runtime performance. NFC.
This patch fixes a compilation time issue, when MachineSink faces PHIs
with a huge number of operands. This can happen for example in goto table
based interpreters, where some basic blocks can have several of those PHIs,
each one with several hundreds operands. MachineSink was spending a
significant time re-building and re-sorting the list of successors of
the current MachineBasicBlock. The computing and sorting of the current
MachineBasicBlock successors is now cached.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239720
91177308-0d34-0410-b5e6-
96231b3b80d8
Jingyue Wu [Mon, 15 Jun 2015 05:46:29 +0000 (05:46 +0000)]
[ValueTracking] do not overwrite analysis results already computed
Summary:
ValueTracking used to overwrite the analysis results computed from
assumes and dominating conditions. This patch fixes this issue.
Test Plan: test/Analysis/ValueTracking/assume.ll
Reviewers: hfinkel, majnemer
Reviewed By: majnemer
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D10283
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239718
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Mon, 15 Jun 2015 03:00:15 +0000 (03:00 +0000)]
[Support][Endian] Define |= and &= for u{big,little}{16,32,64}_t.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239716
91177308-0d34-0410-b5e6-
96231b3b80d8
Hao Liu [Mon, 15 Jun 2015 02:56:40 +0000 (02:56 +0000)]
[AArch64] Delete two empty files, which should be removed by r239713.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239715
91177308-0d34-0410-b5e6-
96231b3b80d8
Hao Liu [Mon, 15 Jun 2015 01:56:40 +0000 (01:56 +0000)]
[AArch64] Revert r239711 again. We need to discuss how to share code between AArch64 and ARM backend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239713
91177308-0d34-0410-b5e6-
96231b3b80d8
Hao Liu [Mon, 15 Jun 2015 01:35:49 +0000 (01:35 +0000)]
[AArch64] Match interleaved memory accesses into ldN/stN instructions.
Re-commit after adding "-aarch64-neon-syntax=generic" to fix the failure on OS X.
This patch was firstly committed in r239514, then reverted in r239544 because of a syntax incompatible failure on OS X.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239711
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sun, 14 Jun 2015 21:47:29 +0000 (21:47 +0000)]
[CMake] Try to fix r239612, not to miss resources/windows_version_resource.rc in clang build.
- Who defines ${LLVM_SOURCE_DIR} ?
- Would windows_version_resource.rc be available in an *installed* llvm tree?
I suggest it may be installed in ${PREFIX}/share.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239703
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 14 Jun 2015 21:01:20 +0000 (21:01 +0000)]
[InstSimplify] fsub nnan x, x -> 0.0 is valid without ninf
Both inf - inf and (-inf) - (-inf) are NaN, so it's already covered by
nnan.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239702
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 14 Jun 2015 18:53:58 +0000 (18:53 +0000)]
[InstSimplify] Add self-fdiv identities for -ffinite-math-only.
When NaNs and Infs are ignored we can fold
X / X -> 1.0
-X / X -> -1.0
X / -X -> -1.0
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239701
91177308-0d34-0410-b5e6-
96231b3b80d8
Igor Breger [Sun, 14 Jun 2015 13:07:47 +0000 (13:07 +0000)]
AVX-512: Implemented DAG lowering for shuff62x2/shufi62x2 instuctions ( Shuffle Packed Values at 128-bit Granularity )
Tests added , vector-shuffle-512-v8.ll test re-generated.
Differential Revision: http://reviews.llvm.org/D10300
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239697
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Kuperstein [Sun, 14 Jun 2015 12:59:45 +0000 (12:59 +0000)]
Add support for parsing the XOR operator in Intel syntax inline assembly.
Differential Revision: http://reviews.llvm.org/D10385
Patch by marina.yatsina@intel.com
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239695
91177308-0d34-0410-b5e6-
96231b3b80d8
Igor Breger [Sun, 14 Jun 2015 12:44:55 +0000 (12:44 +0000)]
AVX-512: Implemented cvtsi2ss/d cvtusi2ss/d instructions with round control for KNL.
Added intrinsics for cvtsi2ss/d instructions.
Added tests for intrinsics and encoding.
Differential Revision: http://reviews.llvm.org/D10430
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239694
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sun, 14 Jun 2015 00:23:40 +0000 (00:23 +0000)]
AsmPrinter.cpp: Avoid crashes for targeting like "arm-mingw32". CurrentFnSym might not be <MCSymbolELF> here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239692
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sun, 14 Jun 2015 00:23:33 +0000 (00:23 +0000)]
Reformat.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239691
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Sat, 13 Jun 2015 21:46:39 +0000 (21:46 +0000)]
[Hexagon] Adding some codegen tests and updating some to match spec.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239690
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 13 Jun 2015 19:50:38 +0000 (19:50 +0000)]
[Statepoints] Skip a vector copy when uniquing values.
No functionality change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239688
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 13 Jun 2015 19:50:29 +0000 (19:50 +0000)]
[ExecutionEngine] ArrayRefize argument passing.
No functionality change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239687
91177308-0d34-0410-b5e6-
96231b3b80d8
Yaron Keren [Sat, 13 Jun 2015 17:50:47 +0000 (17:50 +0000)]
C++11 Rangify loops in AssemblyWriter::printModule, NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239686
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 13 Jun 2015 17:23:04 +0000 (17:23 +0000)]
Don't use std::errc.
As noted on Errc.h:
// * std::errc is just marked with is_error_condition_enum. This means that
// common patters like AnErrorCode == errc::no_such_file_or_directory take
// 4 virtual calls instead of two comparisons.
And on some libstdc++ those virtual functions conclude that
------------------------
int main() {
std::error_code foo = std::make_error_code(std::errc::no_such_file_or_directory);
return foo == std::errc::no_such_file_or_directory;
}
-------------------------
should exit with 0.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239683
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 13 Jun 2015 16:25:12 +0000 (16:25 +0000)]
[DAGCombiner] Added BSWAP(BSWAP(x)) -> x combine pattern.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239682
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sat, 13 Jun 2015 15:33:15 +0000 (15:33 +0000)]
hoist loop-invariant; NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239681
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sat, 13 Jun 2015 15:32:45 +0000 (15:32 +0000)]
remove function names from comments and clean up; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239680
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 13 Jun 2015 15:23:58 +0000 (15:23 +0000)]
[SelectionDAG] Added assertions + UNDEF handling for BSWAP node creation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239679
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sat, 13 Jun 2015 15:06:33 +0000 (15:06 +0000)]
remove unnecessary casts; NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239678
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 13 Jun 2015 14:08:15 +0000 (14:08 +0000)]
[DAGCombiner] Added BSWAP vector constant folding support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239675
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 13 Jun 2015 12:57:36 +0000 (12:57 +0000)]
Stripped trailing whitespace. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239674
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 13 Jun 2015 12:53:21 +0000 (12:53 +0000)]
[LinkerTest] Don't leak error string.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239673
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 13 Jun 2015 12:51:39 +0000 (12:51 +0000)]
Stripped trailing whitespace. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239672
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 13 Jun 2015 12:49:52 +0000 (12:49 +0000)]
Bring in a BumpPtrStringSaver from lld and simplify the interface.
StringSaver now always saves to a BumpPtrAllocator.
The only reason for having the virtual saveImpl is so lld can have a
thread safe version.
The reason for the distinct BumpPtrStringSaver class is to avoid the
virtual destructor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239669
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Fiselier [Sat, 13 Jun 2015 06:55:44 +0000 (06:55 +0000)]
[LIT] Fix failing LIT tests
Summary:
I spend some time trying to get the LIT test suite passing. Here are the changes that I needed to make on my machine.
I made the following changes for the following reasons.
1. google-test.py: The Google test format now checks for "[ PASSED ] 1 test." to check if a test passes.
2. discovery.py: The output appears in a different order on my machine than it did in the test.
3. unittest-adaptor.py: The output appears in a different order on my machine than it did in the test.
4. The classname is now formed differently in `getJUnitXML(...)`.
I'm not sure what is causing the output order to differ in discovery.py and unittest-adaptor.py. Does anybody have any thoughts?
Reviewers: ddunbar, danalbert, jroelofs
Reviewed By: jroelofs
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D9864
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239663
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Sat, 13 Jun 2015 05:11:14 +0000 (05:11 +0000)]
AMDGPU: s/R600/AMDGPU/ in the Makefiles
Now the library names in the Makefiles match the library names in
LLVMBuild.txt.
This should hopefully fix the remaining bot failures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239661
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Sat, 13 Jun 2015 03:46:48 +0000 (03:46 +0000)]
configure: Remove non-portable fall-through operator: ;&
This was added in r239657.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239660
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Sat, 13 Jun 2015 03:42:16 +0000 (03:42 +0000)]
Rename TargetSubtargetInfo::enablePostMachineScheduler() to enablePostRAScheduler()
r213101 changed the behaviour of this method to not only affect the
PostMachineScheduler scheduler but also the PostRAScheduler scheduler,
renaming should make this fact clear. Also document that the preferred
way is to specify this in the scheduling model instead of overriding
this method.
Differential Revision: http://reviews.llvm.org/D10427
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239659
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Sat, 13 Jun 2015 03:42:11 +0000 (03:42 +0000)]
MachineLICM: Use TargetSchedModel instead of just itineraries
This will use Itinieraries if available, but will also work if just a
MCSchedModel is available.
Differential Revision: http://reviews.llvm.org/D10428
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239658
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Sat, 13 Jun 2015 03:28:10 +0000 (03:28 +0000)]
R600 -> AMDGPU rename
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239657
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Wala [Sat, 13 Jun 2015 01:08:00 +0000 (01:08 +0000)]
Revert 239644.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239650
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Fri, 12 Jun 2015 23:37:11 +0000 (23:37 +0000)]
AArch64: map bare-metal arm64-macho triple to MachO MC layer.
Far better than an assertion about expecting ELF.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239647
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Bendersky [Fri, 12 Jun 2015 23:26:42 +0000 (23:26 +0000)]
Fix returning error message in LLVMLinkModules
On error, the temporary output stream wouldn't be flushed and therefore the
caller would see an empty error message.
Patch by Antoine Pitrou
Differential Revision: http://reviews.llvm.org/D10241
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239646
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Fri, 12 Jun 2015 23:13:06 +0000 (23:13 +0000)]
[Orc] Tidy up initialization based on review feedback for r239561 from dblaikie.
NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239645
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Wala [Fri, 12 Jun 2015 22:49:11 +0000 (22:49 +0000)]
[Scalarizer] Fix potential for stale data in Scattered across invocations
Summary:
Scalarizer has two data structures that hold information about changes
to the function, Gathered and Scattered. These are cleared in finish()
at the end of runOnFunction() if finish() detects any changes to the
function.
However, finish() was checking for changes by only checking if
Gathered was non-empty. The function visitStore() only modifies
Scattered without touching Gathered. As a result, Scattered could have
ended up having stale data if Scalarizer only scalarized store
instructions. Since the data in Scattered is used during the execution
of the pass, this introduced dangling pointer errors.
The fix is to check whether both Scattered and Gathered are empty
before deciding what to do in finish().
Reviewers: srhines
Reviewed By: srhines
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D10422
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239644
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Fri, 12 Jun 2015 22:22:50 +0000 (22:22 +0000)]
[Orc] Tidy up the CompileOnDemand layer based on commit review from dblaikie.
NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239642
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Fri, 12 Jun 2015 21:31:15 +0000 (21:31 +0000)]
[Orc] Fix a bug in the CompileOnDemand layer where stub decls were not cloned
into partitions. Also, add an option to clone stub definitions (not just decls)
into partitions: these definitions could be inlined in some places to avoid the
overhead of calling via the stub.
Found by inspection - no test case yet, although I plan to add a unit test for
this once the CompileOnDemand layer refactoring settles down.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239640
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Fri, 12 Jun 2015 20:47:06 +0000 (20:47 +0000)]
R600/SI: Add assembler support for FLAT instructions
- Add glc, slc, and tfe operands to flat instructions
- Add missing flat instructions
- Fix the encoding of flat_load_dwordx3 and flat_store_dwordx3.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239637
91177308-0d34-0410-b5e6-
96231b3b80d8
Yaron Keren [Fri, 12 Jun 2015 20:18:20 +0000 (20:18 +0000)]
Rangify several for loops in ValueEnumerator constructor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239636
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Fri, 12 Jun 2015 19:57:32 +0000 (19:57 +0000)]
[Hexagon] Making intrinsic tests agnostic to register allocation. Narrowing intrinsic parameters to appropriate width.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239634
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Katzman [Fri, 12 Jun 2015 18:44:57 +0000 (18:44 +0000)]
Wrap some long lines in LLVMBuild files. NFC
As suggested by jroelofs in a prior review (D9752),
it makes sense to generally prefer multi-line format.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239632
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Katzman [Fri, 12 Jun 2015 18:31:38 +0000 (18:31 +0000)]
Add 'shave' processor name to Triple
Based on ArchType, Clang's driver can select a non-Clang compiler.
String parsing in Clang would have sufficed if it were only that,
however this change anticipates true llvm support.
Differential Revision: http://reviews.llvm.org/D10413
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239631
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 12 Jun 2015 18:22:03 +0000 (18:22 +0000)]
Refix a use of explicit pointer types in GEP constant folding
In the glorious future of opaque pointer types, it won't be possible to
retrieve the pointee type of a pointer type which is what's being done
in this GEP loop - but the first iteration is always a pointer type and
the loop doesn't care about that case, except whether or not the index
is a constant.
So pull that special case out before the loop and start at the second
iteration (index 1) instead.
Originally committed in r236670 and reverted with a test case in
r239015. This change keeps the test case working while also avoiding
depending on pointee types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239629
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Wala [Fri, 12 Jun 2015 18:16:51 +0000 (18:16 +0000)]
Fix a typo in a comment in MemCpyOpt (test commit)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239628
91177308-0d34-0410-b5e6-
96231b3b80d8
Yaron Keren [Fri, 12 Jun 2015 18:13:20 +0000 (18:13 +0000)]
Rangify two for loops in BitcodeReader.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239627
91177308-0d34-0410-b5e6-
96231b3b80d8
Pete Cooper [Fri, 12 Jun 2015 18:07:34 +0000 (18:07 +0000)]
Remove unnecessary MCExpr.h include from MCSymbol.h
MCSymbol.h already forwards declares MCExpr and only uses MCExpr* so doesn't
need to include the header.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239626
91177308-0d34-0410-b5e6-
96231b3b80d8
Pete Cooper [Fri, 12 Jun 2015 17:48:21 +0000 (17:48 +0000)]
Remove a bunch of inline keywords from User. NFC.
This came up in the patch review for http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-
20150608/281362.html.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239624
91177308-0d34-0410-b5e6-
96231b3b80d8
Pete Cooper [Fri, 12 Jun 2015 17:48:18 +0000 (17:48 +0000)]
Move OperandList to be allocated prior to User for hung off subclasses.
For hung off uses, we need a Use* to tell use where the operands are.
This was User::OperandList but we want to remove that to save space
of all subclasses which aren't making use of 'hung off uses'.
Hung off uses now allocate their own 'OperandList' Use* in the
User::new which they call.
getOperandList() now uses the hung off uses bit to work out where the
Use* for the OperandList lives. If a User has hung off uses, then this
bit tells them to go back a single Use* from the User* and use that
value as the OperandList.
If a User has no hung off uses, then we get the first operand by
subtracting (NumOperands * sizeof(Use)) from the User this pointer.
This saves a pointer from User and all subclasses. Given the average
size of a subclass of User is 112 or 128 bytes, this saves around 7% of space
With malloc tending to align to 16-bytes the real saving is typically more like 3.5%.
On 'opt -O2 verify-uselistorder.lto.bc', peak memory usage prior to this change
is 149MB and after is 143MB so the savings are around 2.5% of peak.
Looking at some passes which allocate many Instructions and Values, parseIR drops
from 54.25MB to 52.21MB while the Inliner calls to Instruction::clone() drops
from 28.20MB to 27.05MB.
Reviewed by Duncan Exon Smith.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239623
91177308-0d34-0410-b5e6-
96231b3b80d8
Pete Cooper [Fri, 12 Jun 2015 17:48:14 +0000 (17:48 +0000)]
Added a version of User::new for hung off uses.
There are now 2 versions of User::new. The first takes a size_t and is the current
implementation for subclasses which need 0 or more Use's allocated for their operands.
The new version takes no extra arguments to say that this subclass needs 'hung off uses'.
The HungOffUses bool is now set in this version of User::new and we can assert in
allocHungOffUses that we are allowed to have hung off uses.
This ensures we call the correct version of User::new for subclasses which need hung off uses.
A future commit will then allocate space for a single Use* which will be used
in place of User::OperandList once that field has been removed.
Reviewed by Duncan Exon Smith.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239622
91177308-0d34-0410-b5e6-
96231b3b80d8
Pete Cooper [Fri, 12 Jun 2015 17:48:10 +0000 (17:48 +0000)]
Rename NumOperands to make it clear its managed by the User. NFC.
This is to try make it very clear that subclasses shouldn't be changing
the value directly. Now that OperandList for normal instructions is computed
using the NumOperands, its critical that the NumOperands is accurate or we
could compute the wrong offset to the first operand.
I looked over all places which update NumOperands and they are all safe.
Hung off use User's don't use NumOperands to compute the OperandList so they
are safe to continue to manipulate it. The only other User which changed it
was GlobalVariable which has an optional init list but always allocated space
for a single Use. It was correctly setting NumOperands to 1 before setting an
initializer, and setting it to 0 after clearing the init list, so the order was safe.
Added some comments to that code to make sure that this isn't changed in future
without being aware of this constraint.
Reviewed by Duncan Exon Smith.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239621
91177308-0d34-0410-b5e6-
96231b3b80d8
Pete Cooper [Fri, 12 Jun 2015 17:48:05 +0000 (17:48 +0000)]
Replace all accesses to User::OperandList with getter and setter methods. NFC.
We don't want anyone to access OperandList directly as its going to be removed
and computed instead. This uses getter's and setter's instead in which we
can later change the underlying implementation of OperandList.
Reviewed by Duncan Exon Smith.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239620
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 12 Jun 2015 17:23:39 +0000 (17:23 +0000)]
Have the ELF symbol predicates match more directly the spec.
The underlaying issues is that this code can't really know if an OS specific or
processor specific section number should return true or false.
One option would be to assert or return an error, but that looks like over
engineering since extensions are not that common.
It seems better to have these be direct implementation of the ELF spec so that
they are natural for someone familiar with ELF reading the code.
Code that does have to handle OS/Architecture specific values can do it at
a higher level.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239618
91177308-0d34-0410-b5e6-
96231b3b80d8
Pete Cooper [Fri, 12 Jun 2015 16:13:54 +0000 (16:13 +0000)]
Don't create instructions from ConstantExpr's in CFLAliasAnalysis.
The CFLAA code currently calls ConstantExpr::getAsInstruction which creates an instruction from a constant expr.
We then pass that instruction to the InstVisitor to analyze it.
Its not necessary to create these instructions as we can just cast from Constant to Operator in the visitor. This is how other InstVisitor’s such as SelectionDAGBuilder handle ConstantExpr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239616
91177308-0d34-0410-b5e6-
96231b3b80d8
Greg Bedwell [Fri, 12 Jun 2015 15:58:29 +0000 (15:58 +0000)]
In MSVC builds embed a VERSIONINFO resource in our exe and DLL files.
This reinstates my commits r238740/r238741 which I reverted due to a failure
in the clang-cl selfhost tests on Windows. I've now fixed the issue in
clang-cl that caused the failure so hopefully all should be well now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239612
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 12 Jun 2015 12:42:13 +0000 (12:42 +0000)]
Remove a hack that tries to align '*'.
The alignment is not required, so we can just remove it for now.
The old code is a hack as it depends on the buffer management to find
the current column.
If the alignment is really desirable, the proper way to do it is
to pass in a formatted_raw_stream that knows the current column.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239603
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 12 Jun 2015 12:20:03 +0000 (12:20 +0000)]
Don't depend on the interleaving of stdout and stderr.
That can change as we change the buffering.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239602
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexander Potapenko [Fri, 12 Jun 2015 11:27:06 +0000 (11:27 +0000)]
[ASan] format AddressSanitizer.cpp with `clang-format -style=Google`, NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239601
91177308-0d34-0410-b5e6-
96231b3b80d8
John Brawn [Fri, 12 Jun 2015 09:38:51 +0000 (09:38 +0000)]
[ARM] Disabling vfp4 should disable fp16
ARMTargetParser::getFPUFeatures should disable fp16 whenever it
disables vfp4, as otherwise something like -mcpu=cortex-a7 -mfpu=none
leaves us with fp16 enabled (though the only effect that will have is
a wrong build attribute).
Differential Revision: http://reviews.llvm.org/D10397
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239599
91177308-0d34-0410-b5e6-
96231b3b80d8
Yaron Keren [Fri, 12 Jun 2015 08:19:32 +0000 (08:19 +0000)]
Replace duplicated iplist<T> types with the corresponding typedefs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239598
91177308-0d34-0410-b5e6-
96231b3b80d8
Yaron Keren [Fri, 12 Jun 2015 05:15:27 +0000 (05:15 +0000)]
Rangify for loops, NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239596
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Fri, 12 Jun 2015 03:25:05 +0000 (03:25 +0000)]
LowerBitSets: Give names to aliases of unnamed bitset element objects.
It is valid for globals to be unnamed, but aliases must have a name. To avoid
creating invalid IR, we need to assign names to any aliases we create that
point to unnamed objects that have been moved into combined globals.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239590
91177308-0d34-0410-b5e6-
96231b3b80d8
Teresa Johnson [Fri, 12 Jun 2015 03:12:00 +0000 (03:12 +0000)]
Revert commit r239480 as it causes https://code.google.com/p/chromium/issues/detail?id=499508#c3.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239589
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Fri, 12 Jun 2015 02:13:45 +0000 (02:13 +0000)]
Add missing #include, found by modules build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239587
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Fri, 12 Jun 2015 01:48:47 +0000 (01:48 +0000)]
[SanitizerCoverage] Use llvm::getDISubprogram() to get location of the entry basic block.
DebugLoc::getFnDebugLoc() should soon be removed. Also,
getDISubprogram() might become more effective soon and wouldn't need to
scan debug locations at all, if function-level metadata would be emitted
by Clang.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239586
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Fri, 12 Jun 2015 01:39:48 +0000 (01:39 +0000)]
[GVN] Use a simpler form of IRBuilder constructor.
Summary:
A side effect of this change is that it IRBuilder now automatically
created debug info locations for new instructions, which is the
same as debug location of insertion point. This is fine for the
functions in questions (GetStoreValueForLoad and
GetMemInstValueForLoad), as they are used in two situations:
* GVN::processLoad, which tries to eliminate a load. In this case
new instructions would have the same debug location as the load they
eventually replace;
* MaterializeAdjustedValue, which adds new instructions to the end
of the basic blocks, which could later be used to replace the load
definition. In this case we don't yet know the way the load would
be eventually replaced (either by assembling the precomputed values
via PHI, or by using them directly), so just using the basic block
strategy seems to be reasonable. There is also a special case
in the code that *would* adjust the location of the last
instruction replacing the load definition to the location of the
load.
Test Plan: regression test suite
Reviewers: echristo, dberlin, dblaikie
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D10405
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239585
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Fri, 12 Jun 2015 01:39:45 +0000 (01:39 +0000)]
[GVN] Use IRBuilder more actively instead of creating instructions manually.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239584
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Thu, 11 Jun 2015 23:37:18 +0000 (23:37 +0000)]
[WinEH] Put finally pointers in the handler scope table field
We were putting them in the filter field, which is correct for 64-bit
but wrong for 32-bit.
Also switch the order of scope table entry emission so outermost entries
are emitted first, and fix an obvious state assignment bug.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239574
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 11 Jun 2015 23:04:56 +0000 (23:04 +0000)]
MC: Prune \return corresponding to r239552. [-Wdocumentation]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239571
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Thu, 11 Jun 2015 22:51:01 +0000 (22:51 +0000)]
[Orc] Attempted fix for GCC ICE on Polly builder.
Along the same lines as the fix in r228568.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239570
91177308-0d34-0410-b5e6-
96231b3b80d8
Juergen Ributzka [Thu, 11 Jun 2015 22:40:04 +0000 (22:40 +0000)]
[Stackmaps][X86] Remove EFLAGS and IP registers from the live-out mask.
Remove the EFLAGS from the stackmap live-out mask. The EFLAGS register is not
supposed to be part of that set, because the X86 calling conventions mark the
register as NOT preserved.
Also remove the IP registers, since spilling and restoring those doesn't really
make any sense.
Related to rdar://problem/
21019635.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239568
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Thu, 11 Jun 2015 22:32:23 +0000 (22:32 +0000)]
[WinEH] Create an llvm.x86.seh.exceptioninfo intrinsic
This intrinsic is like framerecover plus a load. It recovers the EH
registration stack allocation from the parent frame and loads the
exception information field out of it, giving back a pointer to an
EXCEPTION_POINTERS struct. It's designed for clang to use in SEH filter
expressions instead of accessing the EXCEPTION_POINTERS parameter that
is available on x64.
This required a minor change to MC to allow defining a label variable to
another absolute framerecover label variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239567
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Thu, 11 Jun 2015 22:22:45 +0000 (22:22 +0000)]
[Support] Fix a race initializing a static local in MSVC
static local initialization isn't thread safe with MSVC and a race was
reported in PR23817. We can't use std::atomic because it's not trivially
constructible, so instead do some lame volatile global integer
manipulation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239566
91177308-0d34-0410-b5e6-
96231b3b80d8