Commit Graph

109540 Commits

Author SHA1 Message Date
Reid Kleckner
d282ca71b0 Rename END_WITH_NULL to LLVM_END_WITH_NULL and move to Compiler.h
We shouldn't put this kind of attribute stuff in DataTypes.h.

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

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



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

This is not a functional change.



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


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

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

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

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

With this patch the options are visible in every test.

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

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

This fixes PR21377.

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

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221186 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-03 21:52:56 +00:00
Ahmed Bougacha
38728dc043 [X86] Add debug print name for X86ISD::[US]MUL8. NFC-ish.
The opcodes were added in r220516, but I forgot to add the print names.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221185 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-03 21:25:18 +00:00
Rafael Espindola
6199c0cf17 [lit] Forward LD_PRELOAD to tests.
With this patch I can use asan to test the gold plugin without having
to build gold itself with asan.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221183 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-03 21:24:43 +00:00
David Blaikie
dc1d16ae54 Add DwarfCompileUnit::BaseAddress to track the base address used by relative addressing in debug_ranges and debug_loc
This is one of a few steps to generalize range handling to include the
CU range (thus the CU's range list will be moved into the range list
list, losing track of the base address in the process), which means
generalizing ranges from both the skeleton and full unit under fission.

And... then I can used that generalized support for ranges in
fission+gmlt where there'll be a bunch more ranges in the skeleton.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221182 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-03 21:15:30 +00:00
Akira Hatanaka
8d7cc6b0ff [ARM, inline-asm] Fix ARMTargetLowering::getRegForInlineAsmConstraint to return
register class tGPRRegClass if the target is thumb1.

This commit fixes a crash that occurs during register allocation which was
triggered when a virtual register defined by an inline-asm instruction had to
be spilled.
 
rdar://problem/18740489


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221178 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-03 20:37:04 +00:00
Reid Kleckner
cce85e19f9 MSVC requires redeclarations to repeat noexcept
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221177 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-03 20:35:30 +00:00
Ahmed Bougacha
40453da779 [X86] 8bit divrem: Improve codegen for AH register extraction.
For 8-bit divrems where the remainder is used, we used to generate:
    divb  %sil
    shrw  $8, %ax
    movzbl  %al, %eax

That was to avoid an H-reg access, which is problematic mainly because
it isn't possible in REX-prefixed instructions.

This patch optimizes that to:
    divb  %sil
    movzbl  %ah, %eax

To do that, we explicitly extend AH, and extract the L-subreg in the
resulting register.  The extension is done using the NOREX variants of
MOVZX.  To support signed operations, MOVSX_NOREX is also added.
Further, this introduces a new SDNode type, [us]divrem_ext_hreg, which is
then lowered to a sequence containing a single zext (rather than 2).

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221176 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-03 20:26:35 +00:00
Hal Finkel
f16d6b1ff1 EarlyCSE should ignore calls to @llvm.assume
EarlyCSE uses a simple generation scheme for handling memory-based
dependencies, and calls to @llvm.assume (which are marked as writing to memory
to ensure the preservation of control dependencies) disturb that scheme
unnecessarily. Skipping calls to @llvm.assume is legal, and the alternative
(adding AA calls in EarlyCSE) is likely undesirable (we have GVN for that).

Fixes PR21448.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221175 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-03 20:21:32 +00:00
Tom Stellard
fbd383c93c Reapply: R600: Make sure to inline all internal functions
Function calls aren't supported yet.

This was reverted due to build breakages, which should be fixed now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221173 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-03 19:49:05 +00:00
Chad Rosier
3f4e9cb609 [Reassociate] Canonicalize negative constants out of expressions.
This gives CSE/GVN more options to eliminate duplicate expressions.
This is a follow up patch to http://reviews.llvm.org/D4904.

http://reviews.llvm.org/D5363

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221171 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-03 19:11:30 +00:00
Reid Kleckner
cf7bb7fb68 Relax the LLVM_NOEXCEPT _MSC_VER version check back to 1900
Unconditional noexcept support was added in the VS 2013 Nov CTP. Given
that there have been three CTPs since then, I don't think we need
careful macro magic to target that specific tech preview. Instead,
target the major release version number of 1900, which corresponds to
the as-yet unreleased VS "14".

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221169 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-03 18:22:42 +00:00
Paul Robinson
c3e82bf9f5 Normally an 'optnone' function goes through fast-isel, which does not
call DAGCombiner. But we ran into a case (on Windows) where the
calling convention causes argument lowering to bail out of fast-isel,
and we end up in CodeGenAndEmitDAG() which does run DAGCombiner.
So, we need to make DAGCombiner check for 'optnone' after all.

Commit includes the test that found this, plus another one that got
missed in the original optnone work.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221168 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-03 18:19:26 +00:00
Duncan P. N. Exon Smith
5e84760dde IR: MDNode => Value: Instruction::getAllMetadataOtherThanDebugLoc()
Change `Instruction::getAllMetadataOtherThanDebugLoc()` from a vector of
`MDNode` to one of `Value`.  Part of PR21433.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221167 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-03 18:13:57 +00:00
Charlie Turner
c3606b6b2e Remove the cortex-a9-mp CPU.
This CPU definition is redundant. The Cortex-A9 is defined as
supporting multiprocessing extensions. Remove its definition and
update appropriate tests.

LLVM defines both a cortex-a9 CPU and a cortex-a9-mp CPU. The only
difference between the two CPU definitions in ARM.td is that
cortex-a9-mp contains the feature FeatureMP for multiprocessing
extensions.

This is redundant since the Cortex-A9 is defined as having
multiprocessing extensions in the TRMs. armcc also defines the
Cortex-A9 as having multiprocessing extensions by default.

Change-Id: Ifcadaa6c322be0a33d9d2a39cfdd7da1d75981a7

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221166 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-03 17:38:00 +00:00
David Blaikie
c34113433a Cleanup some unused or trivial functions in DwarfCompileUnit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221164 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-03 17:10:38 +00:00
David Blaikie
60b9b0d581 Sink DwarfUnit::CURanges into DwarfCompileUnit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221161 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-03 16:40:43 +00:00
Oliver Stannard
e13ea1ddda [AArch64] Fix miscompile of comparison with 0xffffffffffffffff
Some literals in the AArch64 backend had 15 'f's rather than 16, causing
comparisons with a constant 0xffffffffffffffff to be miscompiled.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221157 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-03 15:28:40 +00:00
Sid Manning
0fc1662219 Handle ctor/init_array initialization.
Hexagon was not calling InitializeELF and could not select between
ctors and init_array.

Phabricator revision: http://reviews.llvm.org/D6061

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221156 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-03 14:56:05 +00:00
Charlie Turner
87dc149162 Merge the directive-eabi_attribute.s and directive-eabi_attribute-2.s tests.
test/MC/ARM/directive-eabi_attribute.s had gotten out-of-sync with
test/MC/ARM/directive-eabi_attribute-2.s. The former tests the encoding of
build attributes in object files, and the latter the encoding in assembly
files. Since both these tests need to be updated at the same time, it makes
sense to combine them into a single test. The object file encodings are being
checked against the ouput of -arm-attributes rather than by direct byte
comparisons which makes for easier reading.

Change-Id: I0075de506ae5626fb2fa235383fe5ce6a65a15a9

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221155 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-03 14:52:00 +00:00
Rafael Espindola
9586f1a56a Add CRLF support to LineIterator.
The MRI scripts have to work with CRLF, and in general it is probably
a good idea to support this in a core utility like LineIterator.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221153 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-03 14:09:47 +00:00
Oliver Stannard
25f4c35b22 Revert r221150, as it broke sanitizer tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221151 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-03 12:19:03 +00:00
Oliver Stannard
b63d71ef81 Emit .eh_frame with relocations to functions, rather than sections
When LLVM emits DWARF call frame information, it currently creates a local,
section-relative symbol in the code section, which is pointed to by a
relocation on the .eh_frame section. However, for C++ we emit some functions in
section groups, and the SysV ABI has some rules to make it easier to remove
these sections
(http://www.sco.com/developers/gabi/latest/ch4.sheader.html#section_group_rules):

  A symbol table entry with STB_LOCAL binding that is defined relative to one
  of a group's sections, and that is contained in a symbol table section that is
  not part of the group, must be discarded if the group members are discarded.
  References to this symbol table entry from outside the group are not allowed.

This means that we need to use the function symbol for the relocation, not a
temporary symbol.

There was a comment in the code claiming that the local symbol was used to
avoid creating a relocation, but a relocation must be created anyway as the
code and CFI are in different sections.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221150 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-03 12:02:51 +00:00
Peter Zotov
89a66f4ae5 [OCaml] Fix mismatched CAMLparam/CAMLreturn.
Also, revert r221142--it was an incorrect fix to this bug
which fixed tests by accident.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221149 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-03 11:47:14 +00:00
Charlie Turner
8e003cdb99 Test commit.
Fixes two typos.

Change-Id: I129f647de8933e1d8f0dc9941bcb91602edce7e2

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221148 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-03 10:58:05 +00:00
Peter Collingbourne
b4793c488f CMake: Add libm to list of system libs printed by llvm-config.
This is required by the interpreter library, and also matches the autoconf
behavior.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221147 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-03 10:38:26 +00:00
Daniel Sanders
8c4cd2f07d [mips] Remove unused prototype and variable. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221146 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-03 10:14:57 +00:00
Peter Zotov
099e59a6c1 [OCaml] Add -g on DEBUG_SYMBOLS=1, not ENABLE_OPTIMIZED.
Thanks echristo for pointing this out.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221145 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-03 10:06:19 +00:00
Peter Zotov
a8ea2c9bd7 Unbreak build.
A bug in lit.cfg was introduced in r221137.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221144 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-03 09:58:41 +00:00
Peter Zotov
49fd9044f7 [OCaml] Don't use deprecated non-caml_namespaced functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221143 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-03 09:51:47 +00:00
Peter Zotov
13fd7205fa [OCaml] Initialize local roots prior to raising.
On 4.02, the OCaml unwinder otherwise gets confused and segfaults.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221142 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-03 09:51:44 +00:00
Peter Zotov
10fa04ca7d [OCaml] Core package should depend on LLVMTransformUtils for LLVMCloneModule.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221141 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-03 09:51:41 +00:00
Peter Zotov
40977ebc6a [OCaml] Fix ocamlc -custom builds when configured as --enable-shared.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221140 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-03 09:51:37 +00:00
Peter Zotov
cf0fe98b05 [OCaml] Avoid embedding absolute paths into executables.
Bindings built out-of-tree, e.g. via OPAM, should append
a line to META.llvm like the following:

linkopts = "-cclib -L$libdir -cclib -Wl,-rpath,$libdir"

where $libdir is the lib/ directory where LLVM libraries are
installed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221139 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-03 09:51:34 +00:00
Peter Zotov
29e82393ab [OCaml] Don't build stub libraries twice.
The default Makefile.rules BUILD_ARCHIVE machinery was
unintentionally enabled.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221138 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-03 09:51:28 +00:00
Peter Zotov
95a8dca3db [OCaml] Run tests twice, with ocamlc and ocamlopt (if available)
ocamlc and ocamlopt expose a distinct set of buildsystem bugs, e.g.
only ocamlc would detect -custom or -dllib-related bugs, and as all
buildbots will have ocamlopt, these bugs will stay hidden.

This change should add no more than 30 seconds of testing time.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221137 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-03 09:50:53 +00:00
Peter Zotov
7158970d0d [OCaml] META: remove exists_if(toplevel).
ocamlfind ignores the predicates in this case, making the package
unavailable for batch compilation as well.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221136 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-03 09:50:02 +00:00
Peter Zotov
3339b71768 [OCaml] ExecutionEngine package should not depend on interpreter.
Interpreter support was removed in r220957.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221135 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-03 09:49:42 +00:00
David Majnemer
9460376a4d Forgot to add input file for test added in r221133
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221134 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-03 07:58:16 +00:00