Quentin Colombet [Tue, 12 Apr 2016 00:38:51 +0000 (00:38 +0000)]
[RegBankSelect] Teach the repairing code how to handle physical
registers.
llvm-svn: 266029
Quentin Colombet [Tue, 12 Apr 2016 00:32:55 +0000 (00:32 +0000)]
[AArch64] Add a test case for the propagation of register banks through
phis.
llvm-svn: 266028
Quentin Colombet [Tue, 12 Apr 2016 00:30:14 +0000 (00:30 +0000)]
[RegisterBankInfo] Do not provide a default mapping for non-reg of phi
operations.
llvm-svn: 266027
Quentin Colombet [Tue, 12 Apr 2016 00:25:22 +0000 (00:25 +0000)]
[AArch64] Add a test case for the repairing of definitions.
llvm-svn: 266026
Quentin Colombet [Tue, 12 Apr 2016 00:12:59 +0000 (00:12 +0000)]
[RegBankSelect] Teach how to repair definitions.
Although repairing definitions is not mandatory for correctness (only
phis would be impacted because of the RPO traversal), not repairing
might go against the cost model. Therefore, just repair when it is
possible.
llvm-svn: 266025
Quentin Colombet [Tue, 12 Apr 2016 00:07:14 +0000 (00:07 +0000)]
[MachineIRBuilder] Expose the insertion point in the public API.
It may be convenient to know where we are about to insert some code, for
instance to save and then restore this insertion.
llvm-svn: 266024
Greg Clayton [Tue, 12 Apr 2016 00:06:27 +0000 (00:06 +0000)]
Fixed Variable::GetDecl() and Variable::GetDeclContext() to check the "Type *" before using it so we don't crash if a variable's type can't be realized which happens more often recently due to -gmodules.
<rdar://problem/
25612626>
llvm-svn: 266023
JF Bastien [Tue, 12 Apr 2016 00:03:26 +0000 (00:03 +0000)]
MergeFunctions: test alloca better
r237193 fix handling of alloca size / align in MergeFunctions, but only tested one and didn't follow FunctionComparator::cmpOperations's usual comparison pattern. It also didn't update Instruction.cpp:haveSameSpecialState which I'll do separately.
llvm-svn: 266022
Quentin Colombet [Tue, 12 Apr 2016 00:00:42 +0000 (00:00 +0000)]
[AArch64] Test that RegBankSelect inserts the proper copies to fix the
register bank assignments.
llvm-svn: 266021
Derek Schuff [Mon, 11 Apr 2016 23:32:13 +0000 (23:32 +0000)]
Replace MachineRegisterInfo::TracksLiveness with a MachineFunctionProperty
Use the MachineFunctionProperty mechanism to indicate whether the
liveness info is accurate instead of a bool flag on MRI.
Keeps the MRI accessor function for convenience. NFC
Differential Revision: http://reviews.llvm.org/D18767
llvm-svn: 266020
Adrian Prantl [Mon, 11 Apr 2016 23:30:29 +0000 (23:30 +0000)]
Add a missing DICompileUnit to testcase.
llvm-svn: 266019
Mehdi Amini [Mon, 11 Apr 2016 23:26:46 +0000 (23:26 +0000)]
ThinLTO renaming: use module hash instead of position in the summary
This is more robust to changes in the link ordering.
Differential Revision: http://reviews.llvm.org/D18946
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 266018
Adrian Prantl [Mon, 11 Apr 2016 23:26:31 +0000 (23:26 +0000)]
Legalize the debug info in this testcase in anticipation of future Verifier improvements.
llvm-svn: 266017
JF Bastien [Mon, 11 Apr 2016 23:03:54 +0000 (23:03 +0000)]
AtomicExpandPass: mark assert variable as used
Avoid -Wunused-variable
llvm-svn: 266016
James Y Knight [Mon, 11 Apr 2016 22:52:42 +0000 (22:52 +0000)]
Fix compile with GCC after r266002 (Add __atomic_* lowering to AtomicExpandPass)
It doesn't like implicitly calling the ArrayRef constructor with a
returned array -- it appears to decays the returned value to a pointer,
first, before trying to make an ArrayRef out of it.
llvm-svn: 266011
Davide Italiano [Mon, 11 Apr 2016 22:39:51 +0000 (22:39 +0000)]
[LTO] Switch Module to std::unique_ptr<>.
Differential Revision: http://reviews.llvm.org/D18994
llvm-svn: 266009
Justin Bogner [Mon, 11 Apr 2016 22:37:13 +0000 (22:37 +0000)]
CodeGen: Fix a use-after-free in TailDuplication
The call to processPHI already erased MI from its parent, so MI isn't
even valid here, making the getParent() call a use-after-free in
addition to being redundant.
Found by ASan with the ArrayRecycler changes in llvm.org/pr26808.
llvm-svn: 266008
JF Bastien [Mon, 11 Apr 2016 22:30:37 +0000 (22:30 +0000)]
NFC: keep comment up to date
MergeFunctions was refactored a while ago, and Instruction.cpp's comments went out of sync. The content did as well, will fix later.
llvm-svn: 266007
Evgeniy Stepanov [Mon, 11 Apr 2016 22:28:13 +0000 (22:28 +0000)]
[safestack] A test for stackprotector canaries.
llvm-svn: 266006
Evgeniy Stepanov [Mon, 11 Apr 2016 22:27:55 +0000 (22:27 +0000)]
Allow simultaneous safestack and stackprotector attributes.
This is the clang part of http://reviews.llvm.org/D18846.
SafeStack instrumentation pass adds stack protector canaries if both
attributes are present on a function. StackProtector pass will step
back if the function has a safestack attribute.
llvm-svn: 266005
Evgeniy Stepanov [Mon, 11 Apr 2016 22:27:48 +0000 (22:27 +0000)]
[safestack] Add canary to unsafe stack frames
Add StackProtector to SafeStack. This adds limited protection against
data corruption in the caller frame. Current implementation treats
all stack protector levels as -fstack-protector-all.
llvm-svn: 266004
Tim Northover [Mon, 11 Apr 2016 22:27:40 +0000 (22:27 +0000)]
ARM: use r7 as the frame-pointer on all MachO targets.
This is better for a few reasons:
+ It matches the other tooling for iOS.
+ It matches EABI in more cases (i.e. Thumb-mode, and in practice we don't
use ARM mode).
+ It leads to infinitesimally smaller code (0.2%, yay!).
rdar://
25369506
llvm-svn: 266003
James Y Knight [Mon, 11 Apr 2016 22:22:33 +0000 (22:22 +0000)]
Add __atomic_* lowering to AtomicExpandPass.
AtomicExpandPass can now lower atomic load, atomic store, atomicrmw, and
cmpxchg instructions to __atomic_* library calls, when the target
doesn't support atomics of a given size.
This is the first step towards moving all atomic lowering from clang
into llvm. When all is done, the behavior of __sync_* builtins,
__atomic_* builtins, and C11 atomics will be unified.
Previously LLVM would pass everything through to the ISelLowering
code. There, unsupported atomic instructions would turn into __sync_*
library calls. Because of that behavior, Clang currently avoids emitting
llvm IR atomic instructions when this would happen, and emits __atomic_*
library functions itself, in the frontend.
This change makes LLVM able to emit __atomic_* libcalls, and thus will
eventually allow clang to depend on LLVM to do the right thing.
It is advantageous to do the new lowering to atomic libcalls in
AtomicExpandPass, before ISel time, because it's important that all
atomic operations for a given size either lower to __atomic_*
libcalls (which may use locks), or native instructions which won't. No
mixing and matching.
At the moment, this code is enabled only for SPARC, as a
demonstration. The next commit will expand support to all of the other
targets.
Differential Revision: http://reviews.llvm.org/D18200
llvm-svn: 266002
Enrico Granata [Mon, 11 Apr 2016 21:50:35 +0000 (21:50 +0000)]
Add support for resolving dynamic types of extended ObjC tagged pointers
rdar://problem/
24401051
llvm-svn: 266001
Manman Ren [Mon, 11 Apr 2016 21:45:33 +0000 (21:45 +0000)]
swifterror: fix up a testing case.
llvm-svn: 266000
Davide Italiano [Mon, 11 Apr 2016 21:16:48 +0000 (21:16 +0000)]
[DebugInfo/Test] Add CU as required.
llvm-svn: 265999
Simon Pilgrim [Mon, 11 Apr 2016 21:10:33 +0000 (21:10 +0000)]
[DAGCombiner] Fold xor/and/or (bitcast(A), bitcast(B)) -> bitcast(op (A,B)) anytime before LegalizeVectorOprs
xor/and/or (bitcast(A), bitcast(B)) -> bitcast(op (A,B)) was only being combined at the AfterLegalizeTypes stage, this patch permits the combine to occur anytime before then as well.
The main aim with this to improve the ability to recognise bitmasks that can be converted to shuffles.
I had to modify a number of AVX512 mask tests as the basic bitcast to/from scalar pattern was being stripped out, preventing testing of the mmask bitops. By replacing the bitcasts with loads we can get almost the same result.
Differential Revision: http://reviews.llvm.org/D18944
llvm-svn: 265998
Manman Ren [Mon, 11 Apr 2016 21:08:06 +0000 (21:08 +0000)]
Swift Calling Convention: swifterror target support.
Differential Revision: http://reviews.llvm.org/D18716
llvm-svn: 265997
Adrian Prantl [Mon, 11 Apr 2016 21:00:26 +0000 (21:00 +0000)]
Revert accidentally committed change
llvm-svn: 265996
Adrian Prantl [Mon, 11 Apr 2016 20:58:57 +0000 (20:58 +0000)]
Add missing DICompileUnit to this testcase
llvm-svn: 265995
Hans Wennborg [Mon, 11 Apr 2016 20:53:59 +0000 (20:53 +0000)]
libclang: fix two memory leaks (PR26292)
llvm-svn: 265994
Zachary Turner [Mon, 11 Apr 2016 20:39:17 +0000 (20:39 +0000)]
Fix some display bugs in llvm-pdbdump.
We were incorrectly reporting all non-64 bit integers as int64s.
This is most evident when trying to print the "short" type, but
in theory could happen with chars too (although usually chars use
a different builtin type).
Additionally, we were using the wrong check when deciding whether
to print an enum definition as a global enum. We were checking
whether or not the enum was "nested", and if so saving it until
we print the class definition that it was nested in. But this is
not correct in rare situations where the enum is nested, but the
class that it's nested in does not have type information in the PDB.
So instead we check if there is a class definition for the parent
in the PDB. If so we save it for later, otherwise we print it.
llvm-svn: 265993
Tom Stellard [Mon, 11 Apr 2016 20:38:40 +0000 (20:38 +0000)]
Revert "AMDGPU/SI: Do not generate s_waitcnt after ds_permute/ds_bpermute"
This reverts commit r263720.
Just confirmed that s_waitcnt is required after ds_permute/ds_bpermute.
llvm-svn: 265992
Richard Trieu [Mon, 11 Apr 2016 20:37:04 +0000 (20:37 +0000)]
Adjust tests to have consistent integer sizes.
Add a triple to the run lines so that integers will the same sizes across runs.
Also add a compile time check to ensure the assumptions about sizes are met.
llvm-svn: 265991
Hans Wennborg [Mon, 11 Apr 2016 20:36:05 +0000 (20:36 +0000)]
Fix repeated conditional expression (PR20711)
llvm-svn: 265990
Hans Wennborg [Mon, 11 Apr 2016 20:35:41 +0000 (20:35 +0000)]
Fix broken assert, PR24624
llvm-svn: 265989
Hans Wennborg [Mon, 11 Apr 2016 20:35:17 +0000 (20:35 +0000)]
Remove redundant .c_str(), as suggested by PR25633
llvm-svn: 265988
Hans Wennborg [Mon, 11 Apr 2016 20:35:01 +0000 (20:35 +0000)]
Fix a couple of redundant conditional expressions (PR27283, PR28282)
llvm-svn: 265987
Rafael Espindola [Mon, 11 Apr 2016 20:34:27 +0000 (20:34 +0000)]
Simplify handling of mips gp* symbols.
Give them values instead of computing it during relocation.
llvm-svn: 265986
Sanjay Patel [Mon, 11 Apr 2016 20:13:44 +0000 (20:13 +0000)]
use range-loops; NFCI
llvm-svn: 265985
Tim Northover [Mon, 11 Apr 2016 19:50:46 +0000 (19:50 +0000)]
MCParser: diagnose missing directional labels more clearly.
Before, ELF at least managed a diagnostic but it was a completely untraceable
"undefined symbol" error. MachO had a variety of even worse behaviours: crash,
emit corrupt file, or an equally bad message.
llvm-svn: 265984
Matthew Simpson [Mon, 11 Apr 2016 19:48:18 +0000 (19:48 +0000)]
[LoopUtils, LV] Fix PR27246 (first-order recurrences)
This patch ensures that when we detect first-order recurrences, we reject a phi
node if its previous value is also a phi node. During vectorization the initial
and previous values of the recurrence are shuffled together to create the value
for the current iteration. However, phi nodes are not widened like other
instructions. This fixes PR27246.
Differential Revision: http://reviews.llvm.org/D18971
llvm-svn: 265983
Charles Li [Mon, 11 Apr 2016 19:30:25 +0000 (19:30 +0000)]
Lit C++11 Compatibility Patch #6
Updated the expected diagnostics of 17 OpenMP tests.
The changes to each test are identical.
llvm-svn: 265982
Rafael Espindola [Mon, 11 Apr 2016 19:14:59 +0000 (19:14 +0000)]
Simplify the creation of __rel[a]_iplt_{start,end}.
They can be regular DefinedSynthetic.
llvm-svn: 265981
Davide Italiano [Mon, 11 Apr 2016 18:53:27 +0000 (18:53 +0000)]
[DebugInfo] Fix even more tests to include DICompileunit.
llvm-svn: 265980
Enrico Granata [Mon, 11 Apr 2016 18:46:37 +0000 (18:46 +0000)]
Add support for additional NSArray formatters
llvm-svn: 265979
Enrico Granata [Mon, 11 Apr 2016 18:46:26 +0000 (18:46 +0000)]
Add a formatter for zero-sized NSData
llvm-svn: 265978
Mehdi Amini [Mon, 11 Apr 2016 18:45:20 +0000 (18:45 +0000)]
Emit the module hash by default with -flto=thin.
Reviewers: tejohnson
Subscribers: joker.eph, cfe-commits
Differential Revision: http://reviews.llvm.org/D18947
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 265977
Sriraman Tallam [Mon, 11 Apr 2016 18:40:50 +0000 (18:40 +0000)]
Test commit.
llvm-svn: 265976
Lang Hames [Mon, 11 Apr 2016 18:33:45 +0000 (18:33 +0000)]
[Object] Make .alt_entry directive parsing MachO specific.
ELF and COFF will now treat .alt_entry like any other unrecognized directive.
llvm-svn: 265975
Adrian Prantl [Mon, 11 Apr 2016 18:15:44 +0000 (18:15 +0000)]
Fix missing DICompileUnits in testcases
llvm-svn: 265974
Sanjay Patel [Mon, 11 Apr 2016 17:58:37 +0000 (17:58 +0000)]
[InstCombine] consolidate tests for related bugs
llvm-svn: 265973
Reid Kleckner [Mon, 11 Apr 2016 17:54:16 +0000 (17:54 +0000)]
Use member initializers for all scalar fields of MachineFrameInfo to save boilerplate
No functionality change.
llvm-svn: 265972
Reid Kleckner [Mon, 11 Apr 2016 17:54:03 +0000 (17:54 +0000)]
Combine redundant stack realignment booleans in MachineFrameInfo
MachineFrameInfo does not need to be able to distinguish between the
user asking us not to realign the stack and the target telling us it
doesn't support stack realignment. Either way, fixed stack objects have
their alignment clamped.
llvm-svn: 265971
Sanjay Patel [Mon, 11 Apr 2016 17:35:57 +0000 (17:35 +0000)]
add FIXME comment; NFC
llvm-svn: 265970
Sanjay Patel [Mon, 11 Apr 2016 17:27:44 +0000 (17:27 +0000)]
add an assert for safety; NFC
llvm-svn: 265969
Sanjay Patel [Mon, 11 Apr 2016 17:25:23 +0000 (17:25 +0000)]
variable names start with a capital letter; NFC
llvm-svn: 265968
Hemant Kulkarni [Mon, 11 Apr 2016 17:15:30 +0000 (17:15 +0000)]
[llvm-readobj] Add ELF hash histogram printing
Differential Revision: http://reviews.llvm.org/D18907
llvm-svn: 265967
Xinliang David Li [Mon, 11 Apr 2016 17:13:08 +0000 (17:13 +0000)]
Add code comment/NFC
llvm-svn: 265966
Sanjay Patel [Mon, 11 Apr 2016 17:11:55 +0000 (17:11 +0000)]
[InstCombine] use canEvaluateShiftedShift() to handle the lshr case (NFCI)
We need just a couple of logic tweaks to consolidate the shl and lshr cases.
This is step 5 of refactoring to solve PR26760:
https://llvm.org/bugs/show_bug.cgi?id=26760
llvm-svn: 265965
Michael Zuckerman [Mon, 11 Apr 2016 17:04:21 +0000 (17:04 +0000)]
[Clang][AVX512][BuiltIn] Adding avx512 ( psll{d|q}512,psllv{16si|8di},psra{d|q}512,psrav{16si|8di},pternlog{d|q}{128|256|512} ) builtin to clang
Differential Revision: http://reviews.llvm.org/D18926
llvm-svn: 265964
Reid Kleckner [Mon, 11 Apr 2016 17:02:34 +0000 (17:02 +0000)]
Update getting started docs
compiler-rt is optional. We often get email from users with compiler-rt
build errors who don't actually need compiler-rt. Marking it optional
should help them avoid those potential problems.
While I'm here, update a reference to the build directory and remove an
obsolete reference to llvm-gcc. Nobody today is under the impression
that Clang depends on GCC.
llvm-svn: 265963
Adrian Prantl [Mon, 11 Apr 2016 16:58:40 +0000 (16:58 +0000)]
Make the distinct DISubprogram in this testcase really distinct.
llvm-svn: 265962
Adrian Prantl [Mon, 11 Apr 2016 16:58:35 +0000 (16:58 +0000)]
Update discriminator testcases to use proper NoDebug CUs instead of omitting
!llvm.dbg.cu.
llvm-svn: 265961
Sanjay Patel [Mon, 11 Apr 2016 16:50:32 +0000 (16:50 +0000)]
[InstCombine] don't try to shift an illegal amount (PR26760)
This is the straightforward fix for PR26760:
https://llvm.org/bugs/show_bug.cgi?id=26760
But we still need to make some changes to generalize this helper function
and then send the lshr case into here.
llvm-svn: 265960
Pavel Labath [Mon, 11 Apr 2016 16:50:08 +0000 (16:50 +0000)]
Mark TestPrintStackTraces as flaky on android arm
llvm-svn: 265959
Pavel Labath [Mon, 11 Apr 2016 16:40:09 +0000 (16:40 +0000)]
[Driver] Fix a segfault in signal handlers
Summary:
If we recieve a SIGCONT or SIGTSTP, while the driver is shutting down (which, sometimes, we do,
for reasons which are not completely clear to me), we would crash to due a null pointer
dereference. Guard against this situation.
Reviewers: clayborg
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D18965
llvm-svn: 265958
Peter Collingbourne [Mon, 11 Apr 2016 16:40:08 +0000 (16:40 +0000)]
ELF: Set FDE count in .eh_frame_hdr correctly.
It is possible to have FDEs with duplicate PCs if ICF was able to merge
functions with FDEs, or if the input files for some reason contained duplicate
FDEs. We previously weren't handling this correctly when producing the
contents of the .eh_frame_hdr section; we were dropping entries and leaving
null entries at the end of the section, which confused consumers of unwind
data, such as the backtrace() function.
Fix the bug by setting the FDE count to the number of FDEs actually emitted
into .eh_frame_hdr, rather than the number of FDEs in .eh_frame.
Differential Revision: http://reviews.llvm.org/D18911
llvm-svn: 265957
Peter Collingbourne [Mon, 11 Apr 2016 16:39:43 +0000 (16:39 +0000)]
ELF: Implement basic support for module asm in bitcode files.
Differential Revision: http://reviews.llvm.org/D18872
llvm-svn: 265956
Tom Stellard [Mon, 11 Apr 2016 16:21:12 +0000 (16:21 +0000)]
TargetRegisterInfo: Add getRegAsmName()
Summary:
The motivation for this new function is to move an invalid assumption
about the relationship between the names of register definitions in
tablegen files and their assembly names into TargetRegisterInfo, so that
we can begin working on fixing this assumption.
The current problem is that if you have a register definition in
TableGen like:
def MYReg0 : Register<"r0", 0>;
The function TargetLowering::getRegForInlineAsmConstraint() derives the
assembly name from the tablegen name: "MyReg0" rather than the given
assembly name "r0". This is working, because on most targets the
tablegen name and the assembly names are case insensitive matches for
each other (e.g. def EAX : X86Reg<"eax", ...>
getRegAsmName() will allow targets to override this default assumption and
return the correct assembly name.
Reviewers: echristo, hfinkel
Subscribers: SamWot, echristo, hfinkel, llvm-commits
Differential Revision: http://reviews.llvm.org/D15614
llvm-svn: 265955
Sanjay Patel [Mon, 11 Apr 2016 16:11:07 +0000 (16:11 +0000)]
[InstCombine] rename variables in shifted-shift helper function (NFCI)
This is step 3 of refactoring to solve PR26760:
https://llvm.org/bugs/show_bug.cgi?id=26760
llvm-svn: 265954
Adrian Prantl [Mon, 11 Apr 2016 15:53:44 +0000 (15:53 +0000)]
More upgrading of old- and very-old-style debug info in testcases.
llvm-svn: 265953
Michael Zuckerman [Mon, 11 Apr 2016 15:46:39 +0000 (15:46 +0000)]
[CLANG] [AVX512] [BUILTIN] Adding PSRA{Q|D|QI|DI}{128|256|512} builtin
Differential Revision: http://reviews.llvm.org/D17693
llvm-svn: 265952
Sanjay Patel [Mon, 11 Apr 2016 15:43:41 +0000 (15:43 +0000)]
[InstCombine] add helper function for shift-shift optimization (NFCI)
This is step 2 of refactoring to solve PR26760:
https://llvm.org/bugs/show_bug.cgi?id=26760
llvm-svn: 265951
Sanjoy Das [Mon, 11 Apr 2016 15:26:18 +0000 (15:26 +0000)]
This reverts commit r265913 and r265912
See PR27315
r265913: "[IndVars] Eliminate op.with.overflow when possible"
r265912: "[SCEV] See through op.with.overflow intrinsics"
llvm-svn: 265950
Petar Jovanovic [Mon, 11 Apr 2016 15:24:23 +0000 (15:24 +0000)]
[mips] Make Static a default relocation model for MIPS codegen
This change follows up defaults for GCC and Clang, so LLVM does not differ
from them. While number of the test files are touched with this change, they
all keep the old (expected) behaviour with the explicit option:
"-relocation-model=pic"
The tests that have not been touched are insensitive to relocation model.
Differential Revision: http://reviews.llvm.org/D17995
llvm-svn: 265949
Adrian McCarthy [Mon, 11 Apr 2016 15:21:01 +0000 (15:21 +0000)]
Retry deletion of temporary files to avoid race conditions on Windows.
Differential Revision: http://reviews.llvm.org/D18912
llvm-svn: 265948
Daniel Sanders [Mon, 11 Apr 2016 15:20:40 +0000 (15:20 +0000)]
[mips] Trivial corrections to range checked immediates.
Summary:
SYNC has a 5-bit unsigned immediate.
Move MIPS16-specific pcrel16 operand to Mips16 files.
Reviewers: vkalintiris
Subscribers: dsanders, sdardis, llvm-commits
Differential Revision: http://reviews.llvm.org/D18755
llvm-svn: 265947
Sanjay Patel [Mon, 11 Apr 2016 15:19:44 +0000 (15:19 +0000)]
[InstCombine] replace test that no longer works as intended
This is step 1 of refactoring to solve PR26760:
https://llvm.org/bugs/show_bug.cgi?id=26760
llvm-svn: 265946
Teresa Johnson [Mon, 11 Apr 2016 14:59:07 +0000 (14:59 +0000)]
[ThinLTO] BitcodeWriter still requires Analysis library
This should fix bot failure:
http://bb.pgr.jp/builders/i686-mingw32-RA-on-linux/builds/9873
The bitcode writer unfortunately still needs the Analysis library, as it
replaces old dependence on BFI etc with dependence on new
ModuleSummaryAnalysis pass.
llvm-svn: 265945
Ulrich Weigand [Mon, 11 Apr 2016 14:38:47 +0000 (14:38 +0000)]
[SystemZ] README: remove an implemented idea, add some new ones
The note about conditional returns can now be removed, as they are
implemented. Let's also add 2 new ones in exchange.
Author: koriakin
Differential Revision: http://reviews.llvm.org/D18962
llvm-svn: 265944
Ulrich Weigand [Mon, 11 Apr 2016 14:35:39 +0000 (14:35 +0000)]
[SystemZ] Add SVC instruction
This is going to be useful for inline assembly only.
Author: koriakin
Differential Revision: http://reviews.llvm.org/D18952
llvm-svn: 265943
Michael Kruse [Mon, 11 Apr 2016 14:34:08 +0000 (14:34 +0000)]
Allow overflow of indices with constant dim-sizes.
Allow overflow of indices into the next higher dimension if it has
constant size. E.g.
float A[32][2];
((float*)A)[5];
is effectively the same as
A[2][1];
This can happen since r265379 as a side effect if ScopDetection
recognizes an access as affine, but ScopInfo rejects the GetElementPtr.
Differential Revision: http://reviews.llvm.org/D18878
llvm-svn: 265942
Teresa Johnson [Mon, 11 Apr 2016 13:58:45 +0000 (13:58 +0000)]
[ThinLTO] Move summary computation from BitcodeWriter to new pass
Summary:
This is the first step in also serializing the index out to LLVM
assembly.
The per-module summary written to bitcode is moved out of the bitcode
writer and to a new analysis pass (ModuleSummaryIndexWrapperPass).
The pass itself uses a new builder class to compute index, and the
builder class is used directly in places where we don't have a pass
manager (e.g. llvm-as).
Because we are computing summaries outside of the bitcode writer, we no
longer can use value ids created by the bitcode writer's
ValueEnumerator. This required changing the reference graph edge type
to use a new ValueInfo class holding a union between a GUID (combined
index) and Value* (permodule index). The Value* are converted to the
appropriate value ID during bitcode writing.
Also, this enables removal of the BitWriter library's dependence on the
Analysis library that was previously required for the summary computation.
Reviewers: joker.eph
Subscribers: joker.eph, llvm-commits
Differential Revision: http://reviews.llvm.org/D18763
llvm-svn: 265941
Rafael Espindola [Mon, 11 Apr 2016 13:51:23 +0000 (13:51 +0000)]
Mark OffsetSec const. NFC.
llvm-svn: 265940
Rafael Espindola [Mon, 11 Apr 2016 13:47:35 +0000 (13:47 +0000)]
Remove initializer that are always set by the constructor.
llvm-svn: 265939
Rafael Espindola [Mon, 11 Apr 2016 13:44:05 +0000 (13:44 +0000)]
Mark a few methods const.
llvm-svn: 265938
Michael Kruse [Mon, 11 Apr 2016 13:24:29 +0000 (13:24 +0000)]
Do not bind a non-const reference to a rvalue. NFC.
MSVC warns with:
warning C4239: nonstandard extension used: 'initializing': conversion from 'llvm::DebugLoc' to 'llvm::DebugLoc &'
note: A non-const reference may only be bound to an lvalue
Change the reference to a const reference.
llvm-svn: 265937
Oliver Stannard [Mon, 11 Apr 2016 13:06:28 +0000 (13:06 +0000)]
[ARM] Avoid switching ARM/Thumb mode on .arch/.cpu directive
When we see a .arch or .cpu directive, we should try to avoid switching
ARM/Thumb mode if possible.
If we do have to switch modes, we also need to emit the correct mapping
symbol for the new ISA. We did not do this previously, so could emit
ARM code with Thumb mapping symbols (or vice-versa).
The GAS behaviour is to always stay in the same mode, and to emit an
error on any instructions seen when the current mode is not available on
the current target. We can't represent that situation easily (we assume
that Thumb mode is available if ModeThumb is set), so we differ from the
GAS behaviour when switching to a target that can't support the old
mode. I've added a warning for when this implicit mode-switch occurs.
Differential Revision: http://reviews.llvm.org/D18955
llvm-svn: 265936
Michael Zuckerman [Mon, 11 Apr 2016 12:32:31 +0000 (12:32 +0000)]
[Clang][AVX512][BuiltIn] Adding avx512 ( punpck{h|l}{dq|qdq}{128|256|512},rndscale{ss|sd}, {scalef{ss|sd|pd512|ps512} ) builtin to clang
Differential Revision: http://reviews.llvm.org/D18929
llvm-svn: 265935
Benjamin Kramer [Mon, 11 Apr 2016 12:19:19 +0000 (12:19 +0000)]
[clang-format] Walk backwards from end() instead of forwards from rend().
This should've been forwards from rbegin(), reverse iterators are just
too confusing to be used by mere mortals. Fixes out-of-bounds walks over
the list.
llvm-svn: 265934
Ulrich Weigand [Mon, 11 Apr 2016 12:12:32 +0000 (12:12 +0000)]
[SystemZ] Support conditional indirect sibling calls via BCR
This adds a conditional variant of CallBR instruction, CallBCR. Also,
it can be fused with integer comparisons, resulting in one of the new
C*BCall instructions.
In addition to CallBRCL limitations, this has another one: it won't
trigger if the function to call isn't already in %r1 - see f22 in the
test for an example (it's also why the loads in tests are volatile).
Author: koriakin
Differential Revision: http://reviews.llvm.org/D18928
llvm-svn: 265933
Ulrich Weigand [Mon, 11 Apr 2016 12:03:30 +0000 (12:03 +0000)]
[SystemZ] Remove incorrect CC use for C*BReturn instructions
These are fused compare-and-branches, so they obviously don't use CC.
Author: koriakin
Differential Revision: http://reviews.llvm.org/D18927
llvm-svn: 265932
Bhushan D. Attarde [Mon, 11 Apr 2016 11:19:37 +0000 (11:19 +0000)]
Remove unintentional return
llvm-svn: 265931
Simon Pilgrim [Mon, 11 Apr 2016 11:10:36 +0000 (11:10 +0000)]
[X86] Added extra widening tests for and/xor/or bit operations
Add tests for bitcasting an illegal vector to/from a legal scalar
Additional tests requested for D18944
llvm-svn: 265930
Simon Pilgrim [Mon, 11 Apr 2016 10:58:52 +0000 (10:58 +0000)]
[X86] Added extra widening tests for and/xor/or bit operations
To make sure we're dealing with both cases of legal/illegal number of vector elements and legal/illegal vector element types
llvm-svn: 265929
Michael Zuckerman [Mon, 11 Apr 2016 10:22:07 +0000 (10:22 +0000)]
[Clang][AVX512][BuiltIn] Adding avx512 ( ptest{n}m{b|w}{128|256|512} ) builtin to clang
Differential Revision: http://reviews.llvm.org/D18924
llvm-svn: 265928
Simon Pilgrim [Mon, 11 Apr 2016 10:22:05 +0000 (10:22 +0000)]
[X86] Regenerated sdglue test checks
llvm-svn: 265927
Benjamin Kramer [Mon, 11 Apr 2016 10:16:37 +0000 (10:16 +0000)]
Don't clutter the test directory with temporary IR files.
-emit-llvm emits a file, -emit-llvm-only doesn't.
llvm-svn: 265926
Simon Pilgrim [Mon, 11 Apr 2016 10:16:27 +0000 (10:16 +0000)]
[X86] Added widening tests for and/xor/or bit operations
Part of additional tests requested for D18944
llvm-svn: 265925