Commit Graph

153530 Commits

Author SHA1 Message Date
Wei Ding
75acc65cb3 Add ‘llvm.experimental.constrained.fma‘ Intrinsic.
Differential Revision: http://reviews.llvm.org/D36335

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311629 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-24 04:18:24 +00:00
Adam Nemet
05f89d64f5 Support all integer types in DiagnosticInfoOptimizationBase::Argument
We were missing size_t (unsigned long) on macOS.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311628 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-24 04:04:49 +00:00
Daniel Berlin
9dc6eddb1d NewGVN: We weren't properly simplifying selects with equal arguments due to a thinko.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311626 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-24 02:43:17 +00:00
Eric Beckmann
e90e727e0d Fix bug 34051 by handling empty .res files gracefully.
Summary:
Previously, llvm-cvtres crashes on .res files which are empty except for
the null header.  This allows the library to simply pass over them.

Subscribers: llvm-commits, hiraditya

Differential Revision: https://reviews.llvm.org/D37044

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311625 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-24 02:36:50 +00:00
Hans Wennborg
6d2214fde6 [DAG] Fix Node Replacement in PromoteIntBinOp
When one operand is a user of another in a promoted binary operation
we may replace and delete the returned value before returning
triggering an assertion. Reorder node replacements to prevent this.

Fixes PR34137.

Landing on behalf of Nirav.

Differential Revision: https://reviews.llvm.org/D36581

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311623 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-24 01:08:27 +00:00
Dylan McKay
e42da35bfc [AVR] Use the correct register classes for 16-bit atomic operations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311620 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-24 00:14:38 +00:00
Dehao Chen
4d101c0667 Add test to cover accurate-sample-profile.
Summary: This patch adds test to cover the logic guarded by "accurate-sample-profile" flag.

Reviewers: davidxl

Reviewed By: davidxl

Subscribers: sanjoy, llvm-commits, eraman

Differential Revision: https://reviews.llvm.org/D37084

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311618 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-23 23:19:11 +00:00
Tim Northover
b97dac5226 ARM: use internal relocations for local symbols after all.
Switching to external relocations for ARM-mode branches (to allow Thumb
interworking when the offset is unencodable) causes calls to temporary symbols
to be miscompiled and instead go to the parent externally visible symbol.

Calling a temporary never happens in compiled code, but can occasionally in
hand-written assembly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311611 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-23 22:07:10 +00:00
Adrian Prantl
91ad652cd8 Retire the llvm.dbg.mir hack after r311594.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311610 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-23 22:02:36 +00:00
Aditya Nandakumar
8bb11e0e80 Fix Verifier test - add REQUIRES aarch64-registered-target
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311609 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-23 21:55:36 +00:00
Adrian Prantl
a2224c91e5 Add a Verifier check for DILocation's scopes.
Found via https://bugs.llvm.org/show_bug.cgi?id=33997.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311608 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-23 21:52:24 +00:00
Jonas Devlieghere
e69aa182b7 [WebAssembly] Fix overflow for input with missing version
Differential revision: https://reviews.llvm.org/D37070

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311605 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-23 21:36:04 +00:00
Rong Xu
7996242b16 [PGO] Set edge weights for indirectbr instruction with profile counts
Current PGO only annotates the edge weight for branch and switch instructions
with profile counts. We should also annotate the indirectbr instruction as
all the information is there. This patch enables the annotating for indirectbr
instructions. Also uses this annotation in branch probability analysis.

Differential Revision: https://reviews.llvm.org/D37074


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311604 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-23 21:36:02 +00:00
Geoff Berry
78d28dbc5a [AArch64][Falkor] Fix bug in Falkor HWPF tag collision avoidance
LDPDi was incorrectly marked as ignoring the destination register in the
prefetcher tag.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311599 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-23 21:11:28 +00:00
Pete Couperus
333b7c6706 Test commit.
Fix instrinsic -> intrinsic typo.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311598 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-23 20:58:22 +00:00
Aditya Nandakumar
5f06407357 [GISEl]: Translate phi into G_PHI
G_PHI has the same semantics as PHI but also has types.
This lets us verify that the types in the G_PHI are consistent.
This also allows specifying legalization actions for G_PHIs.

https://reviews.llvm.org/D36990

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311596 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-23 20:45:48 +00:00
Reid Kleckner
5417eb62a0 Attempt to fix the BUILD_SHARED_LIBS build after the DIExpression change
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311595 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-23 20:39:35 +00:00
Reid Kleckner
a5b2af0eae Parse and print DIExpressions inline to ease IR and MIR testing
Summary:
Most DIExpressions are empty or very simple. When they are complex, they
tend to be unique, so checking them inline is reasonable.

This also avoids the need for CodeGen passes to append to the
llvm.dbg.mir named md node.

See also PR22780, for making DIExpression not be an MDNode.

Reviewers: aprantl, dexonsmith, dblaikie

Subscribers: qcolombet, javed.absar, eraman, hiraditya, llvm-commits

Differential Revision: https://reviews.llvm.org/D37075

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311594 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-23 20:31:27 +00:00
Lei Huang
35d604386e Update branch coalescing to be a PowerPC specific pass
Implementing this pass as a PowerPC specific pass.  Branch coalescing utilizes
the analyzeBranch method which currently does not include any implicit operands.
This is not an issue on PPC but must be handled on other targets.

Differential Revision : https: // reviews.llvm.org/D32776

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311588 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-23 19:25:04 +00:00
Greg Clayton
0087021b40 Updated my email address.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311581 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-23 18:00:07 +00:00
Benjamin Kramer
da237ed12d [X86] Fix -Wenum-compare warning
lib/Target/X86/X86ISelLowering.cpp:34613:25: error: enumeral mismatch in
conditional expression: 'llvm::ISD::NodeType' vs
'llvm::X86ISD::NodeType'

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311580 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-23 17:50:46 +00:00
Craig Topper
44f90d0a15 [AVX512] Don't create SHRUNKBLEND SDNodes for 512-bit vectors
There are no 512-bit blend instructions so we shouldn't create SHRUNKBLEND for them.

On a side note, it looks like there may be a missed opportunity for constant folding TESTM when LHS and RHS are equal.

This fixes PR34139.

Differential Revision: https://reviews.llvm.org/D36992

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311572 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-23 16:41:02 +00:00
Craig Topper
47b719dfa8 [X86] Remove X86ISD::FMADD in favor ISD::FMA
There's no reason to have a target specific node with the same semantics as a target independent opcode.

This should simplify D36335 so that it doesn't need to touch X86ISelDAGToDAG.cpp

Differential Revision: https://reviews.llvm.org/D36983

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311568 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-23 16:28:04 +00:00
Yonghong Song
d0ef4bebe9 bpf: close the file descriptor after probe inside getHostCPUNameForBPF
Signed-off-by: Yonghong Song <yhs@fb.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311567 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-23 16:24:31 +00:00
Hans Wennborg
18b8cfa7ee LowerAtomic: Don't skip optnone functions; atomic still need lowering (PR34020)
The lowering isn't really an optimization, so optnone shouldn't make a
difference. ARM relies on the pass running when using "-mthread-model
single", because in that mode, it doesn't run AtomicExpand. See bug for
more details.

Differential Revision: https://reviews.llvm.org/D37040

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311565 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-23 15:43:28 +00:00
Ilya Biryukov
851d8014a1 Fixed invalid variable name in Dockerfile scripts.
LLVM_SVN_REVISION was used instead of LLVM_SVN_REV.
This caused a revision option to be ignored in Dockerfiles.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311564 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-23 15:36:44 +00:00
Victor Leschuk
0e75cf0e23 Revert r311546 as it breaks build
http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win/builds/4394



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311560 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-23 15:21:10 +00:00
Victor Leschuk
d177228190 Make lit :: shtest-format.py supported on Windows again
It was marked as unsupported on Windows in r311230 because on some Win10 
machines it failed or caused hang. The problem was that on these machines
system bash (C:\Windows\System32\bash.exe) was used which requires paths to be
passed like '/mnt/c/path/to/my/script' instead of 'C:\path\to\my\script'.

TODO: we should make lit detect if system bash is used instead of msys and set
appropriate path format.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311558 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-23 14:59:09 +00:00
Rui Ueyama
6603f56f5f Revert r311552: [Bash-autocompletion] Add support for static analyzer flags
This reverts commit r311552 because it broke ubsan and asan bots.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311557 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-23 14:48:58 +00:00
Gor Nishanov
1e95aaa810 [coroutines] CoroBegin from inner coroutines should be considered for spills
Summary:
If a coroutine outer calls another coroutine inner and the inner coroutine body is inlined into the outer, coro.begin from the inner coroutine should be considered for spilling if accessed across suspends.

Prior to this change, coroutine frame building code was not considering any coro.begins for spilling.
With this change, we only ignore coro.begin for the current coroutine, but, any coro.begins that were inlined into the current coroutine are eligible for spills.

Fixes PR34267

Reviewers: GorNishanov

Subscribers: qcolombet, llvm-commits, EricWF

Differential Revision: https://reviews.llvm.org/D37062

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311556 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-23 14:47:52 +00:00
Chad Rosier
37d17304a3 [Reassociate] Don't canonicalize x + (-Constant * y) -> x - (Constant * y)..
..if the resulting subtract will be broken up later.  This can cause us to get
into an infinite loop.

x + (-5.0 * y)      -> x - (5.0 * y)       ; Canonicalize neg const
x - (5.0 * y)       -> x + (0 - (5.0 * y)) ; Break up subtract
x + (0 - (5.0 * y)) -> x + (-5.0 * y)      ; Replace 0-X with X*-1.

PR34078

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311554 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-23 14:10:06 +00:00
Yuka Takahashi
c2ae4dbfbe [Bash-autocompletion] Add support for static analyzer flags
Summary:
This is a patch for clang autocomplete feature.

It will collect values which -analyzer-checker takes, which is defined in
clang/StaticAnalyzer/Checkers/Checkers.inc, dynamically.
First, from ValuesCode class in Options.td, TableGen will generate C++
code in Options.inc. Options.inc will be included in DriverOptions.cpp, and
calls OptTable's addValues function. addValues function will add second
argument to Option's Values class. Values contains string like "foo,bar,.."
which is handed to Values class
in OptTable.

Reviewers: v.g.vassilev, teemperor, ruiu

Subscribers: hiraditya, cfe-commits

Differential Revision: https://reviews.llvm.org/D36782

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311552 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-23 13:39:47 +00:00
Daniel Sanders
631020137d [globalisel][tablegen] Add support for ImmLeaf without SDNodeXForm
Summary:
This patch adds support for predicates on imm nodes but only for ImmLeaf and not for PatLeaf or PatFrag and only where the value does not need to be transformed before being rendered into the instruction.

The limitation on PatLeaf/PatFrag/SDNodeXForm is due to differences in the necessary target-supplied C++ for GlobalISel.

Depends on D36085

Reviewers: ab, t.p.northover, qcolombet, rovka, aditya_nandakumar

Reviewed By: rovka

Subscribers: kristof.beyls, javed.absar, igorb, llvm-commits

Differential Revision: https://reviews.llvm.org/D36086

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311546 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-23 12:14:18 +00:00
Florian Hahn
6c41152656 [ARM] Check for assembler instructions in test.
Currently this test causes test failures on some machines, due to isel not being registered. Update the test to run all passes and check emitted assembly instructions for now. 


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311545 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-23 11:53:24 +00:00
Florian Hahn
2d810c27ff [ARM] Add missing patterns for insert_subvector.
Summary: In some cases, shufflevector instruction can be transformed involving insert_subvector instructions. The ARM backend was missing some insert_subvector patterns, causing a failure during instruction selection. AArch64 has similar patterns.

Reviewers: t.p.northover, olista01, javed.absar, rengolin

Reviewed By: javed.absar

Subscribers: aemerson, kristof.beyls, llvm-commits

Differential Revision: https://reviews.llvm.org/D36796

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311543 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-23 10:20:59 +00:00
Daniel Sanders
c2086906b5 [globalisel][tablegen] Add tests for FeatureBitsets and ComplexPattern predicates.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311542 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-23 10:09:25 +00:00
Davide Italiano
d7a2c86855 [gold] Test we don't strip globals when producing relocatables.
lld was broken in this regard (PR33097). The gold plugin gets this
right so, no changes needed, but better adding a test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311541 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-23 09:43:41 +00:00
Davide Italiano
b7a48d833a [InstCombine] Fold branches with irrelevant conditions to a constant.
InstCombine folds instructions with irrelevant conditions to undef.
This, as Nuno confirmed is a bug.
(see https://bugs.llvm.org/show_bug.cgi?id=33409#c1 )

Given the original motivation for the change is that of removing an
USE, we now fold to false instead (which reaches the same goal
without undesired side effects).

Fixes PR33409.

Differential Revision:  https://reviews.llvm.org/D36975

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311540 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-23 09:14:37 +00:00
Hiroshi Inoue
ea638e645f [PowerPC] better instruction selection for OR (XOR) with a 32-bit immediate
- recommitting after fixing a test failure on MacOS

On PPC64, OR (XOR) with a 32-bit immediate can be done with only two instructions, i.e. ori + oris.
But the current LLVM generates three or four instructions for this purpose (and also it clobbers one GPR).

This patch makes PPC backend generate ori + oris (xori + xoris) for OR (XOR) with a 32-bit immediate.

e.g. (x | 0xFFFFFFFF) should be

	ori 3, 3, 65535
	oris 3, 3, 65535

but LLVM generates without this patch

	li 4, 0
	oris 4, 4, 65535
	ori 4, 4, 65535
	or 3, 3, 4

Differential Revision: https://reviews.llvm.org/D34757



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311538 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-23 08:55:18 +00:00
Krasimir Georgiev
d753d9e1b8 [AArch64] Silence unused variable warning in opt mode after r311533
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311535 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-23 08:40:22 +00:00
Sjoerd Meijer
cf5ecd39be [AArch64] ISel legalization debug messages. NFCI.
Debugging AArch64 instruction legalization and custom lowering is really an
unpleasant experience because it shows nodes that appear out of thin air.
In commit r311444, some debug messages have been added to SelectionDAG, the
target independent part, and this patch adds some AArch64 specific messages.

Differential Revision: https://reviews.llvm.org/D36964



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311533 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-23 08:18:37 +00:00
Alex Bradbury
e2aa191ac4 [Lanai] Remove dead functions from LanaiRegisterInfo
getEHExceptionRegister and getEHHandlerRegister are unused and were removed 
from most backends in rL192099. This patch removes them from Lanai.

Differential Revision: https://reviews.llvm.org/D36829


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311531 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-23 07:14:48 +00:00
Hiroshi Inoue
0722ecf05c Revert rL311526: [PowerPC] better instruction selection for OR (XOR) with a 32-bit immediate
This reverts commit rL311526 due to failures in some buildbot.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311530 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-23 06:38:05 +00:00
Craig Topper
5ce564e8aa [InstCombine] Remove unused argument. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311529 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-23 05:46:09 +00:00
Craig Topper
de8d034916 [InstCombine] Replace a simple matcher with a plain old dyn_cast. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311528 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-23 05:46:08 +00:00
Craig Topper
b9e85a09b1 [InstCombine] Remove an unnecessary dyn_cast to Instruction and a switch over two opcodes. Just dyn_cast to the specific instruction classes individually. NFC
Change the helper methods to take the more specific class as well.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311527 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-23 05:46:07 +00:00
Hiroshi Inoue
65bc8755b1 [PowerPC] better instruction selection for OR (XOR) with a 32-bit immediate
On PPC64, OR (XOR) with a 32-bit immediate can be done with only two instructions, i.e. ori + oris.
But the current LLVM generates three or four instructions for this purpose (and also it clobbers one GPR).

This patch makes PPC backend generate ori + oris (xori + xoris) for OR (XOR) with a 32-bit immediate.

e.g. (x | 0xFFFFFFFF) should be

	ori 3, 3, 65535
	oris 3, 3, 65535

but LLVM generates without this patch

	li 4, 0
	oris 4, 4, 65535
	ori 4, 4, 65535
	or 3, 3, 4

Differential Revision: https://reviews.llvm.org/D34757



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311526 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-23 05:15:15 +00:00
Dean Michael Berris
d5e52ea44d [XRay][CodeGen] Use PIC-friendly code in XRay sleds; remove synthetic references in .text
Summary:
This change achieves two things:

  - Redefine the Custom Event handling instrumentation points emitted by
    the compiler to not require dynamic relocation of references to the
    __xray_CustomEvent trampoline.

  - Remove the synthetic reference we emit at the end of a function that
    we used to keep auxiliary sections alive in favour of SHF_LINK_ORDER
    associated with the section where the function is defined.

To achieve the custom event handling change, we've had to introduce the
concept of sled versioning -- this will need to be supported by the
runtime to allow us to understand how to turn on/off the new version of
the custom event handling sleds. That change has to land first before we
change the way we write the sleds.

To remove the synthetic reference, we rely on a relatively new linker
feature that preserves the sections that are associated with each other.
This allows us to limit the effects on the .text section of ELF
binaries.

Because we're still using absolute references that are resolved at
runtime for the instrumentation map (and function index) maps, we mark
these sections write-able. In the future we can re-define the entries in
the map to use relative relocations instead that can be statically
determined by the linker. That change will be a bit more invasive so we
defer this for later.

Depends on D36816.

Reviewers: dblaikie, echristo, pcc

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D36615

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311525 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-23 04:49:41 +00:00
Yonghong Song
d7276a40d8 bpf: add variants of -mcpu=# and support for additional jmp insns
-mcpu=# will support:
  . generic: the default insn set
  . v1: insn set version 1, the same as generic
  . v2: insn set version 2, version 1 + additional jmp insns
  . probe: the compiler will probe the underlying kernel to
           decide proper version of insn set.

We did not not use -mcpu=native since llc/llvm will interpret -mcpu=native
as the underlying hardware architecture regardless of -march value.

Currently, only x86_64 supports -mcpu=probe. Other architecture will
silently revert to "generic".

Also added -mcpu=help to print available cpu parameters.
llvm will print out the information only if there are at least one
cpu and at least one feature. Add an unused dummy feature to
enable the printout.

Examples for usage:
$ llc -march=bpf -mcpu=v1 -filetype=asm t.ll
$ llc -march=bpf -mcpu=v2 -filetype=asm t.ll
$ llc -march=bpf -mcpu=generic -filetype=asm t.ll
$ llc -march=bpf -mcpu=probe -filetype=asm t.ll
$ llc -march=bpf -mcpu=v3 -filetype=asm t.ll
'v3' is not a recognized processor for this target (ignoring processor)
...
$ llc -march=bpf -mcpu=help -filetype=asm t.ll
Available CPUs for this target:

  generic - Select the generic processor.
  probe   - Select the probe processor.
  v1      - Select the v1 processor.
  v2      - Select the v2 processor.

Available features for this target:

  dummy - unused feature.

Use +feature to enable a feature, or -feature to disable it.
For example, llc -mcpu=mycpu -mattr=+feature1,-feature2
...

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Yonghong Song <yhs@fb.com>
Acked-by: Alexei Starovoitov <ast@kernel.org>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311522 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-23 04:25:57 +00:00
Matthias Braun
212ebf2492 Fix tail-merge-after-mbp test
The output of this test changed after the fix in r311520 to have
-run-pass=block-placement behave like it does in a normal pipeline.
Adjust the test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311521 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-23 03:49:53 +00:00