Commit Graph

126263 Commits

Author SHA1 Message Date
Xinliang David Li
084942c12e [Coverage] Refactor coverage mapping reader code /NFC
In this refactoring, member functions are introduced to access
CovMap header/func record members and hide layout details. This
will enable further code restructuring to support reading multiple
versions of coverage mapping data with shared/templatized code. 
(When coveremap format version changes, backward compatibtility
should be preserved).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257547 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-13 00:16:43 +00:00
Ana Pazos
f1f1b483b6 Guard fabs to bfc convert with V6T2 flag
Summary:
BFC instructions are available in ARMv6T2 and above.


Reviewers: t.p.northover

Subscribers: aemerson

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257546 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-13 00:03:35 +00:00
Quentin Colombet
dab10b3735 [ARM] Mark VMOV with immediate: isAsCheapAsMove.
VMOVs are not strictly speaking cheap, but they are as expensive as a vector
copy (VORR), so we should prefer rematerialization over splitting when it
applies.

rdar://problem/23754176


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257545 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-13 00:02:40 +00:00
Fiona Glaser
8634c66a7d CannotBeOrderedLessThanZero: add some missing cases
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257542 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 23:37:30 +00:00
Rui Ueyama
68e634ada8 COFF: Teach llvm-objdump how to dump DLL forwarder symbols.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257539 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 23:28:42 +00:00
Derek Schuff
8ced4e849d [WebAssembly] Fix disassembler shared-libs build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257536 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 23:03:40 +00:00
Matthias Braun
4adfe414ef RegisterPressure: Expose RegisterOperands API
Previously the RegisterOperands have only been used internally in
RegisterPressure.cpp. However this datastructure can be useful for other
tasks as well and allows refactoring of PDiff initialisation out of
RPTracker::recede().

This patch:
- Exposes RegisterOperands as public API
- Splits RPTracker::recede() into a part that skips DebugValues and
  maintains the region borders, and the core that changes register
  pressure when given a set of RegisterOperands.
- This allows to move the PDiff initialisation out recede() into a
  method of the PressureDiffs class.
- The upcoming subregister scheduling code will also use
  RegisterOperands to avoid pushing more unrelated functionality into
  recede()/advance().

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257535 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 22:57:35 +00:00
Keno Fischer
58b254770a [Utils] Insert DW_OP_bit_piece when only describing part of the variable
Summary: The dbg.declare -> dbg.value conversion looks through any zext/sext
to find a value to describe the variable (in the expectation that those
zext/sext instruction will go away later). However, those values do not
cover the entire variable and thus need a DW_OP_bit_piece.

Reviewers: aprantl
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D16061

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257534 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 22:46:09 +00:00
Nathan Slingerland
21314fb768 [Support] Add saturating multiply-add support function
Summary: Add SaturatingMultiplyAdd convenience function template since A + (X * Y) comes up frequently when doing weighted arithmetic.

Reviewers: davidxl, silvas

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257532 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 22:34:00 +00:00
David Majnemer
469e6b0982 [CodeView] Initialize column-end to zero
CodeView, unlike DWARF, can associate code with a range of columns.
However, LLVM can only represent a single column position internally.

We used to claim that the end column and start column were the same
which yielded less than satisfactory results: we would stop printing at
the _beginning_ of the source expression!  Instead, mark the column-end
as 'zero' to indicate that we don't have one (as per the documentation
for IDiaLineNumber::get_lineNumberEnd).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257528 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 21:58:20 +00:00
Dan Gohman
4b49dfacab [WebAsssembly] Register the MC register info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257525 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 21:27:55 +00:00
Michael Zuckerman
67f5e4f21e [AVX512] adding PROLQ and PROLD Intrinsics
Differential Revision: http://reviews.llvm.org/D16048


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257523 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 21:19:17 +00:00
Dan Gohman
548cf051f4 [WebAssembly] Fix a test to work even when the integrated assembler is enabled.
Add -no-integrated-as to this test, since it's testing inline asm strings
that aren't actually valid assembly syntax.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257519 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 21:01:30 +00:00
Kyle Butt
703fd28e42 Codegen: [PPC] Handle weighted comparisons when inserting selects.
Only non-weighted predicates were handled in PPCInstrInfo::insertSelect. Handle
the weighted predicates as well.

This latent bug was triggered by r255398, because it added use of the
branch-weighted predicates.

While here, switch over an enum instead of an int to get the compiler to enforce
totality in the future.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257518 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 21:00:43 +00:00
Dan Gohman
b8e08438aa [WebAssembly] Add a EM_WEBASSEMBLY value, and several bits of code that use it.
A request has been made to the official registry, but an official value is
not yet available. This patch uses a temporary value in order to support
development. When an official value is recieved, the value of EM_WEBASSEMBLY
will be updated.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257517 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 20:56:01 +00:00
Dan Gohman
b6ba98d0dd [WebAssembly] Add ELFRelocs/WebAssembly.def as a "textual header" to the module map.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257515 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 20:51:40 +00:00
Dan Gohman
f49a61441d [WebAssembly] Introduce a WebAssemblyTargetStreamer class.
Refactor .param, .result, .local, and .endfunc, as directives, using the
proper MCTargetStreamer mechanism, rather than fake instructions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257511 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 20:30:51 +00:00
Krzysztof Parzyszek
9d327232e3 Replace inherited constructor with an explicit one
Some bots failed when the inherited constructor was used.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257508 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 19:27:59 +00:00
Dan Gohman
b58587dac1 [WebAssembly] Make CFG stackification independent of basic-block labels.
This patch changes the way labels are referenced. Instead of referencing the
basic-block label name (eg. .LBB0_0), instructions now just have an immediate
which indicates the depth in the control-flow stack to find a label to jump to.
This makes them much closer to what we expect to have in the binary encoding,
and avoids the problem of basic-block label names not being explicit in the
binary encoding.

Also, it terminates blocks and loops with end_block and end_loop instructions,
rather than basic-block label names, for similar reasons.

This will also fix problems where two constructs appear to have the same label,
because we no longer explicitly use labels, so consumers that need labels will
presumably create their own labels, and presumably they won't reuse labels
when they do.

This patch does make the code a little more awkward to read; as a partial
mitigation, this patch also introduces comments showing where the labels are,
and comments on each branch showing where it's branching to.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257505 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 19:14:46 +00:00
Krzysztof Parzyszek
5c562302c2 [Hexagon] Implement RDF-based post-RA optimizations
- Handle simple cases of register copies (what current RDF CP allows).
- Hexagon-specific dead code elimination: handles dead address updates
  in post-increment instructions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257504 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 19:09:01 +00:00
Sanjay Patel
44d6fd556f [LibCallSimplifier] use instruction-level fast-math-flags to transform pow(x, 0.5) calls
Also, propagate the FMF to the newly created sqrt() call.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257503 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 19:06:35 +00:00
Lang Hames
05e78944a1 [ORC] More cleanup, partially aimed at working around GCC ICE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257501 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 19:01:49 +00:00
Sanjay Patel
70b3436457 rangify; NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257500 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 18:47:59 +00:00
Reid Kleckner
f0fc5dbf97 Auto-link with ole32.dll to simplify building LLVM.dll
Patch by Jakob Bornecrantz

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257499 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 18:33:49 +00:00
Lang Hames
9859617d8c [Orc] Replace lambda with a helper method.
This is good cleanup, but I'm also hoping it'll fix some more GCC ICEs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257498 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 18:17:23 +00:00
Sanjay Patel
bd8623ae5c function names start with a lower case letter ; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257496 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 18:03:37 +00:00
Teresa Johnson
411162c2db Fix bot failure from r257493: remove extraneous temp file read
This was left from an earlier version of the test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257494 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 17:53:59 +00:00
Teresa Johnson
51ec8b2357 [ThinLTO] Handle an external call from an import to an alias in dest
The findExternalCalls routine ignores calls to functions already
defined in the dest module. This was not handling the case where
the definition in the current module is actually an alias to a
function call.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257493 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 17:48:44 +00:00
Sanjay Patel
75660cfed9 [LibCallSimplifier] use instruction-level fast-math-flags to transform pow(exp(x)) calls
See also:
http://reviews.llvm.org/rL255555
http://reviews.llvm.org/rL256871
http://reviews.llvm.org/rL256964
http://reviews.llvm.org/rL257400
http://reviews.llvm.org/rL257404
http://reviews.llvm.org/rL257414



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257491 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 17:30:37 +00:00
Krzysztof Parzyszek
04a98e25aa RDF: Copy propagation
This is a very limited implementation of DFG-based copy propagation.
It only handles actual COPY instructions (does not handle other equivalents
such as add-immediate with a 0 operand).
The major limitation is that it does not update the DFG: that will be the
change required to make it more robust (hopefully coming up soon).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257490 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 17:23:48 +00:00
Tom Stellard
e395458a4f AMDGPU: Emit note directive for HSA even if there are no functions
Reviewers: arsenm, echristo

Subscribers: arsenm, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257488 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 17:18:17 +00:00
Lang Hames
09c7fb3a60 [Orc] Clang-format.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257487 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 17:06:32 +00:00
Lang Hames
dab4109a7b [Orc] Take another shot at working around the GCC 4.7 ICE in
http://lab.llvm.org:8011/builders/clang-x86_64-ubuntu-gdb-75/builds/27486



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257486 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 17:04:12 +00:00
Krzysztof Parzyszek
76580abdf6 RDF: Dead code elimination
Utility class to perform DFG-based dead code elimination.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257485 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 17:01:16 +00:00
Sanjay Patel
51ea8ac887 consolidate exp/exp2 tests
The transform is identical, so keep the tests together and save some overhead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257484 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 17:00:38 +00:00
Krzysztof Parzyszek
f0ce2c50e1 Fix compiler warnings from r257477
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257483 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 16:51:55 +00:00
Kostya Serebryany
53ff84bf11 [libFuzzer] add a macro LLVM_FUZZER_DEFINES_SANITIZER_WEAK_HOOOKS
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257482 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 16:50:18 +00:00
Sanjay Patel
f70661c843 Add/edit tests to include instruction-level FMF on calls
Prepatory patch before changing LibCallSimplifier to use the FMF.
Also, tighten the CHECK lines and give the tests more meaningful names.
Similar changes to:
http://reviews.llvm.org/rL257414



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257481 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 16:50:17 +00:00
Krzysztof Parzyszek
1f5e82ef66 RDF: Implement register liveness analysis
Compute block live-ins and operand kill flags from the DFG.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257480 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 15:56:33 +00:00
Daniel Sanders
1c140c48ae [mips] Correct operand order in DSP's mthi/mtlo
Summary: The result register is the second operand as per the other mt* instructions.

Reviewers: vkalintiris

Subscribers: llvm-commits, dsanders

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257478 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 15:15:14 +00:00
Krzysztof Parzyszek
79af24e256 Register Data Flow: data flow graph
Target independent, SSA-based data flow framework for representing
data flow between physical registers.

This commit implements the creation of the actual data flow graph.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257477 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 15:09:49 +00:00
Benjamin Kramer
44c8b64aac [Hexagon] Make helper function static. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257476 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 14:58:49 +00:00
Rafael Espindola
fe84f6bc6d Fix test on windows.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257475 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 14:58:40 +00:00
Keno Fischer
7125c9519f [ARM] Fix several state persistence bugs
Summary:
This fixes three bugs, in all of which state is not or incorrecly reset between
objects (i.e. when reusing the same pass manager to create multiple object
files):
1) AttributeSection needs to be reset to nullptr, because otherwise the backend
   will try to emit into the old object file's attribute section causing a
   segmentation fault.
2) MappingSymbolCounter needs to be reset, otherwise the second object file
   will start where the first one left off.
3) The MCStreamer base class resets the Streamer's e_flags settings. Since
   EF_ARM_EABI_VER5 is set on streamer creation, we need to set it again
   after the MCStreamer was rest.

Also rename Reset (uppser case) to EHReset to avoid confusion with
reset (lower case).

Reviewers: rengolin
Differential Revision: http://reviews.llvm.org/D15950

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257473 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 13:38:15 +00:00
Andrey Turetskiy
a20f3c90ff Test commit access - tiny comment and code style fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257472 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 13:34:11 +00:00
Robert Lougher
e5716c4e3a The isel pattern that selects the memory-register form of VCVTPH2PS
(64 to 128-bit) matches against the pattern fragment 'vzmovl_v2i64'
(a zero-extended 64-bit load).

However, a change in r248784 teaches the instruction combiner that only
the lower 64 bits of the input to a 128-bit vcvtph2ps are used.  This means
the instruction combiner will ordinarily optimize away the upper 64-bit
insertelement instruction in the zero-extension and so we no longer select
the memory-register form.  To fix this a new pattern has been added.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257470 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 11:48:25 +00:00
Christof Douma
d6d9c0e008 The --debug-only option now takes a comma separated list of debug types.
This means that the DEBUG_TYPE cannot take a comma anymore. All existing passes
conform to this rule.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257466 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 10:23:13 +00:00
Igor Breger
d5839e5e84 AVX512: VPMOVAPS/PD and VPMOVUPS/PD (load) intrinsic implementation.
Differential Revision: http://reviews.llvm.org/D16042

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257463 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 10:02:32 +00:00
Axel Naumann
98079ab3f1 Explicitly enable OBJECT library "target".
With this, one can build a lib from the objects of other libs:
set(SOURCES
  $<TARGET_OBJECTS:obj.clingInterpreter>
  $<TARGET_OBJECTS:obj.clingMetaProcessor>
  $<TARGET_OBJECTS:obj.clingUtils>
  )

Reviewed by Chris Bieneman - thanks!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257459 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 07:44:58 +00:00
Lang Hames
08529ecce9 [Orc] Comment out debugging output in OrcRemoteTargetClient::reserveMem to see
whether this affects the GCC 4.7 ICE on
http://lab.llvm.org:8011/builders/clang-x86_64-ubuntu-gdb-75 .



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257458 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 07:26:28 +00:00