platform/upstream/llvm.git
4 years ago[CallSite removal][SCCP] Use CallBase instead of CallSite. NFC
Craig Topper [Mon, 20 Apr 2020 07:05:18 +0000 (00:05 -0700)]
[CallSite removal][SCCP] Use CallBase instead of CallSite. NFC

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

4 years ago[clangd][test] Make sed git bash compliant
Kadir Cetinkaya [Mon, 20 Apr 2020 06:27:15 +0000 (08:27 +0200)]
[clangd][test] Make sed git bash compliant

4 years ago[CallSite removal][Analysis] Use CallBase instead of CallSite in SparsePropagation...
Craig Topper [Mon, 20 Apr 2020 05:39:24 +0000 (22:39 -0700)]
[CallSite removal][Analysis] Use CallBase instead of CallSite in SparsePropagation unit test. NFC

4 years ago[CallSite removal][CalledValuePropagation] Use CallBase instead of CallSite. NFC
Craig Topper [Mon, 20 Apr 2020 04:54:38 +0000 (21:54 -0700)]
[CallSite removal][CalledValuePropagation] Use CallBase instead of CallSite. NFC

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

4 years agollvm-dwarfdump: Fix UB (unsequenced writes) introduced in e0fd87cc64d5
David Blaikie [Mon, 20 Apr 2020 04:32:33 +0000 (21:32 -0700)]
llvm-dwarfdump: Fix UB (unsequenced writes) introduced in e0fd87cc64d5

Unsequenced write due to "x &= f()" where 'f()' modifies 'x'.

Detected by the llvm-clang-x86_64-expensive-checks-win buildbot.
Investigated/identified by Galina - thanks!

4 years ago[Test] Fix test failure: platform-dependent printout
Max Kazantsev [Mon, 20 Apr 2020 03:26:15 +0000 (10:26 +0700)]
[Test] Fix test failure: platform-dependent printout

4 years agoHandle CET for -exception-model sjlj
Xiang1 Zhang [Mon, 20 Apr 2020 02:17:34 +0000 (10:17 +0800)]
Handle CET for -exception-model sjlj

Summary:
In SjLj exception mode, the old landingpad BB will create a new landingpad BB and use indirect branch jump to the old landingpad BB in lowering.
So we should add 2 endbr for this exception model.

Reviewers: hjl.tools, craig.topper, annita.zhang, LuoYuanke, pengfei, efriedma

Reviewed By: LuoYuanke

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

4 years ago[Object] Use BFD name for little-endian PowerPC64
Bill Wendling [Mon, 20 Apr 2020 03:08:30 +0000 (20:08 -0700)]
[Object] Use BFD name for little-endian PowerPC64

Summary:
Little-endian PowerPC object files should report "elf64-powerpcle" instead of
"elf64-powerpc".

Reviewers: jhenderson, MaskRay, espindola, alexshap, rupprecht, #powerpc

Reviewed By: MaskRay

Subscribers: wuzish, emaste, nemanjai, shchenz, steven.zhang, llvm-commits

Tags: #llvm, #powerpc

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

4 years ago[Test] Add a test showing how CFG analyses are invalidated after LV
Max Kazantsev [Mon, 20 Apr 2020 02:37:30 +0000 (09:37 +0700)]
[Test] Add a test showing how CFG analyses are invalidated after LV

It demonstrates that, even if LV does no actual vectorization and only
forms LCSSA, CFG analyses get dropped.

4 years ago[X86][MC][NFC] Reduce the parameters of functions in X86MCCodeEmitter(Part III)
Shengchen Kan [Sat, 18 Apr 2020 08:52:50 +0000 (16:52 +0800)]
[X86][MC][NFC] Reduce the parameters of functions in X86MCCodeEmitter(Part III)

Summary:
When we encode an instruction, we need to know the number of bytes being
emitted to determine the fixups in `X86MCCodeEmitter::emitImmediate`.
There are only two callers for `emitImmediate`: `emitMemModRMByte` and
`encodeInstruction`.

Before this patch, we kept track of the current byte being emitted
by passing a reference parameter `CurByte` across all the `emit*`
funtions, which is ugly and unnecessary. For example, we don't have any
fixups when emitting prefixes, so we don't need to track this value.

In this patch, we use `StartByte` to record the initial status of the
streamer, and use `OS.tell()` to get the current status of the streamer
when we need to know the number of bytes being emitted. On one hand,
this eliminates the parameter `CurByte` for most `emit*` functions, on
the other hand, this make things clear: Only pass the parameter when we
really need it.

Reviewers: craig.topper, pengfei, MaskRay

Reviewed By: craig.topper, MaskRay

Subscribers: hiraditya, llvm-commits, annita.zhang

Tags: #llvm

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

4 years ago[CallSite removal][WebAssembly] Replace CallSite with CallBase in WebAssemblyOptimize...
Craig Topper [Mon, 20 Apr 2020 01:32:20 +0000 (18:32 -0700)]
[CallSite removal][WebAssembly] Replace CallSite with CallBase in WebAssemblyOptimizeReturned.

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

4 years ago[CallSite removal][Analysis] Replace CallSite with CallBase in MemoryBuiltins. NFC
Craig Topper [Mon, 20 Apr 2020 01:32:03 +0000 (18:32 -0700)]
[CallSite removal][Analysis] Replace CallSite with CallBase in MemoryBuiltins. NFC

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

4 years ago[CallSite removal][Lint] Replace visitCallSite with visitCallBase. NFC
Craig Topper [Mon, 20 Apr 2020 01:31:42 +0000 (18:31 -0700)]
[CallSite removal][Lint] Replace visitCallSite with visitCallBase. NFC

Drop visitCallInst/visitInvokeInst since the generic implementation
will delegate to visitCallBase. They appear to be from a time
before visitCallSite existed in the InstVisitor system.

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

4 years ago[X86] Add X86ISD nodes for PDEP and PEXT.
Craig Topper [Sun, 19 Apr 2020 23:13:22 +0000 (16:13 -0700)]
[X86] Add X86ISD nodes for PDEP and PEXT.

This will allow use to add DAG combines for these instructions.

4 years ago[CallSite removal][AMDGPU] Use CallBase instead of CallSite in AMDGPUFixFunctionBitca...
Craig Topper [Sun, 19 Apr 2020 07:41:43 +0000 (00:41 -0700)]
[CallSite removal][AMDGPU] Use CallBase instead of CallSite in AMDGPUFixFunctionBitcasts. NFC

4 years agoX86CallLowering.h - remove unnecessary ArrayRef.h include. NFC.
Simon Pilgrim [Sun, 19 Apr 2020 20:24:25 +0000 (21:24 +0100)]
X86CallLowering.h - remove unnecessary ArrayRef.h include. NFC.

4 years agoSectionMemoryManager.h - remove unnecessary StringRef.h include. NFC.
Simon Pilgrim [Sat, 18 Apr 2020 17:52:07 +0000 (18:52 +0100)]
SectionMemoryManager.h - remove unnecessary StringRef.h include. NFC.

4 years ago[LVI] Use Optional instead of out parameter (NFC)
Nikita Popov [Thu, 9 Apr 2020 19:13:03 +0000 (21:13 +0200)]
[LVI] Use Optional instead of out parameter (NFC)

As suggested on D76788, this switches the LVI implementation to
return Optional<ValueLatticeElement> from various methods, instead
of passing in a ValueLatticeElement reference and returning a boolean.

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

4 years ago[TTI] Clean up includes (NFC).
Florian Hahn [Sun, 19 Apr 2020 19:02:45 +0000 (20:02 +0100)]
[TTI] Clean up includes (NFC).

Remove some unnecessary includes, replace some with forward
declarations.

This also exposed a few places that were missing some includes.

4 years ago[IVDescriptors] Clean up includes.
Florian Hahn [Sun, 19 Apr 2020 18:39:55 +0000 (19:39 +0100)]
[IVDescriptors] Clean up includes.

Some includes are not required and forward declarations can be used
instead. This also exposed a few places that were not directly including
required files.

4 years ago[LoopUtils] Clean up includes, use forward decls if appropriate (NFC).
Florian Hahn [Sun, 19 Apr 2020 17:17:20 +0000 (18:17 +0100)]
[LoopUtils] Clean up includes, use forward decls if appropriate (NFC).

Most of the includes in LoopUtils.h are not required in the header and
they can be replaced by forward declarations.

Unfortunately includes of TargetTransformInfo.h and IVDescriptors.h pull
in a bunch of additional things, but there is no easy way to get rid of
them at the moment I think.

4 years agoFix one more link for a Rationale doc moved under Rationale/
Mehdi Amini [Sun, 19 Apr 2020 17:03:01 +0000 (17:03 +0000)]
Fix one more link for a Rationale doc moved under Rationale/

4 years agoDependenceGraphBuilder.h - remove unused includes. NFC.
Simon Pilgrim [Sun, 19 Apr 2020 16:52:35 +0000 (17:52 +0100)]
DependenceGraphBuilder.h - remove unused includes. NFC.
Replace with forward declarations.

4 years agoFix documentation link to MlirSpirvAbi
Mehdi Amini [Fri, 17 Apr 2020 19:23:57 +0000 (19:23 +0000)]
Fix documentation link to MlirSpirvAbi

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

4 years agoFix one more doc links after moving the document under Tutorials
Mehdi Amini [Sun, 19 Apr 2020 16:52:05 +0000 (16:52 +0000)]
Fix one more doc links after moving the document under Tutorials

4 years agoFix more broken doc links after some moved under the Rationale category
Mehdi Amini [Sun, 19 Apr 2020 16:49:30 +0000 (16:49 +0000)]
Fix more broken doc links after some moved under the Rationale category

4 years agoX86MachineFunctionInfo.h - remove unused include. NFC.
Simon Pilgrim [Sun, 19 Apr 2020 15:52:26 +0000 (16:52 +0100)]
X86MachineFunctionInfo.h - remove unused include. NFC.

4 years agoX86InstrInfo.h - remove unused forward declarations. NFC.
Simon Pilgrim [Sun, 19 Apr 2020 13:44:19 +0000 (14:44 +0100)]
X86InstrInfo.h - remove unused forward declarations. NFC.

4 years agoX86DisassemblerDecoder.h - remove unused forward declaration. NFC.
Simon Pilgrim [Sun, 19 Apr 2020 13:41:25 +0000 (14:41 +0100)]
X86DisassemblerDecoder.h - remove unused forward declaration. NFC.

4 years ago[CMake] Delete HAVE_SCHED_GETAFFINITY and HAVE_CPU_COUNT
Fangrui Song [Sun, 19 Apr 2020 15:46:47 +0000 (08:46 -0700)]
[CMake] Delete HAVE_SCHED_GETAFFINITY and HAVE_CPU_COUNT

sched_getaffinity (Linux specific) has been available

* in glibc since 2002-08-08 (commit 972e719e8154eec5f543b027e2a08dfa285d55d5)
* in musl since the initial check-in.

4 years ago[InstSimplify] add tests for logic+icmp folds for nullptr; NFC
Sanjay Patel [Sun, 19 Apr 2020 14:42:08 +0000 (10:42 -0400)]
[InstSimplify] add tests for logic+icmp folds for nullptr; NFC

See discussion in D78430.

4 years ago[x86] avoid build warning for enum mismatch; NFC
Sanjay Patel [Sun, 19 Apr 2020 14:19:37 +0000 (10:19 -0400)]
[x86] avoid build warning for enum mismatch; NFC

gcc may warn here because X86ISD::NodeType is specified as "unsigned",
but ISD::NodeType is a naked C enum (although passed as an "unsigned"
throughout SDAG).

4 years ago[LAA] Remove unnecessary includes (NFC).
Florian Hahn [Sun, 19 Apr 2020 14:11:25 +0000 (15:11 +0100)]
[LAA] Remove unnecessary includes (NFC).

4 years agoX86MCTargetDesc.h - remove unnecessary includes and forward declarations. NFC.
Simon Pilgrim [Sun, 19 Apr 2020 13:29:35 +0000 (14:29 +0100)]
X86MCTargetDesc.h - remove unnecessary includes and forward declarations. NFC.

4 years agoX86.h - remove unused forward declarations. NFC.
Simon Pilgrim [Sun, 19 Apr 2020 13:28:52 +0000 (14:28 +0100)]
X86.h - remove unused forward declarations. NFC.

4 years agoX86SelectionDAGInfo.h - remove unnecessary includes and forward declarations. NFC.
Simon Pilgrim [Sun, 19 Apr 2020 13:20:53 +0000 (14:20 +0100)]
X86SelectionDAGInfo.h - remove unnecessary includes and forward declarations. NFC.

4 years agoX86TargetTransformInfo.h - remove unnecessary includes. NFC.
Simon Pilgrim [Sun, 19 Apr 2020 13:03:29 +0000 (14:03 +0100)]
X86TargetTransformInfo.h - remove unnecessary includes. NFC.

4 years ago[ARM] Regenerate tests. NFC
David Green [Sun, 19 Apr 2020 12:21:01 +0000 (13:21 +0100)]
[ARM] Regenerate tests. NFC

4 years ago[X86][SSE] getFauxShuffle - don't combine shuffles with small truncated scalars ...
Simon Pilgrim [Sun, 19 Apr 2020 12:34:58 +0000 (13:34 +0100)]
[X86][SSE] getFauxShuffle - don't combine shuffles with small truncated scalars (PR45604)

getFauxShuffle attempts to combine INSERT_VECTOR_ELT(TRUNCATE/EXTEND(EXTRACT_VECTOR_ELT(x))) patterns into a target shuffle chain.

PR45604 identified an issue where the scalar was truncated to a size smaller than the destination vector element and then zero extended back, which requires the upper bits to be zero'd which we don't currently do.

To avoid the bug I've added an early out in these truncation cases, a future commit should allow us to handle this by inserting the necessary SM_SentinelZero padding.

4 years ago[clangd] Add index export to dexp
Sam McCall [Sun, 19 Apr 2020 12:33:00 +0000 (14:33 +0200)]
[clangd] Add index export to dexp

Summary: Add a command to dexp that exports index data in chosen format (e.g. YAML).

Reviewers: sammccall

Subscribers: kbobyrev, mgorny, ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits

Tags: #clang-tools-extra, #clang

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

4 years ago[x86] use vector instructions to lower more FP->int->FP casts
Sanjay Patel [Sun, 19 Apr 2020 12:32:02 +0000 (08:32 -0400)]
[x86] use vector instructions to lower more FP->int->FP casts

This is an enhancement to D77895 to avoid another
round-trip from XMM->GPR->XMM. This time we handle
the case of starting/ending with an f64 and casting
to signed i32 as the intermediate value.

It's a bit more involved than I initially assumed
because we need to use target-specific opcodes to
represent the non-standard cast ops.

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

4 years ago[clangd] Extend YAML Serialization
Sam McCall [Sun, 19 Apr 2020 12:22:23 +0000 (14:22 +0200)]
[clangd] Extend YAML Serialization

Reviewers: sammccall

Reviewed By: sammccall

Subscribers: mgorny, ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits

Tags: #clang-tools-extra, #clang

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

4 years ago[VectorCombine] transform bitcasted shuffle to wider elements
Sanjay Patel [Sun, 19 Apr 2020 12:06:17 +0000 (08:06 -0400)]
[VectorCombine] transform bitcasted shuffle to wider elements

bitcast (shuf V, MaskC) --> shuf (bitcast V), MaskC'

This is the widen shuffle elements enhancement to D76727.
It builds on the analysis and simplifications in
D77881 and rG6a7e958a423e.

The phase ordering tests show that we can simplify inverse
shuffles across a binop in both directions (widen/narrow or
narrow/widen) now.

There's another potential transform visible in some of the
remaining TODOs - move a bitcasted operand of a shuffle
after the shuffle.

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

4 years ago[InstSimplify] add tests for logic-of-icmp with min/max constant; NFC
Sanjay Patel [Fri, 17 Apr 2020 18:05:04 +0000 (14:05 -0400)]
[InstSimplify] add tests for logic-of-icmp with min/max constant; NFC

See PR45510:
https://bugs.llvm.org/show_bug.cgi?id=45510

We had partial coverage for some of these patterns, so removing duplicate tests
with the complete set in the new test file.

4 years ago[X86][SSE] Add test case for PR45604
Simon Pilgrim [Sun, 19 Apr 2020 12:13:54 +0000 (13:13 +0100)]
[X86][SSE] Add test case for PR45604

4 years agoSelectionDAGBuilder.h - remove unused includes + forward declarations. NFC.
Simon Pilgrim [Sun, 19 Apr 2020 11:38:41 +0000 (12:38 +0100)]
SelectionDAGBuilder.h - remove unused includes + forward declarations. NFC.
Replace SelectionDAG.h include with SelectionDAG forward declaration.

4 years agoX86InstrFMA3Info.h - remove unnecessary includes. NFC.
Simon Pilgrim [Sun, 19 Apr 2020 11:17:56 +0000 (12:17 +0100)]
X86InstrFMA3Info.h - remove unnecessary includes. NFC.
There were a number of cpp files explicitly relying on X86InstrFMA3Info.h to include the X86.h header - so I've had to add it locally.

4 years agoInstrEmitter.h - reduce SelectionDAG.h include to SelectionDAGNodes.h include.
Simon Pilgrim [Sun, 19 Apr 2020 10:52:31 +0000 (11:52 +0100)]
InstrEmitter.h - reduce SelectionDAG.h include to SelectionDAGNodes.h include.
Add SDDbgLabel/TargetLowering forward declarations.
Add the full SelectionDAG.h include to InstrEmitter.cpp.

4 years agoX86AsmPrinter.h - cleanup includes and forward declarations. NFC.
Simon Pilgrim [Sun, 19 Apr 2020 10:38:50 +0000 (11:38 +0100)]
X86AsmPrinter.h - cleanup includes and forward declarations. NFC.
Reduce X86Subtarget.h/MCCodeEmitter.h/TargetMachine.h includes to forward declarations
Add explicit X86Subtarget.h/TargetMachine.h includes to X86AsmPrinter.cpp/X86MCInstLower.cpp
Remove unused MCSymbol forward declaration

4 years agoDebugHandlerBase.h - reduce MachineInstr.h include to DebugLoc.h include.
Simon Pilgrim [Sun, 19 Apr 2020 10:13:26 +0000 (11:13 +0100)]
DebugHandlerBase.h - reduce MachineInstr.h include to DebugLoc.h include.

We were only including MachineInstr.h for DebugLoc.h. This exposes an implicit include dependency in BTFDebug.h where I've had to add the MachineInstr.h include.

4 years agoBuildLibCalls.h - remove unnecessary TargetLibraryInfo forward declaration. NFC
Simon Pilgrim [Sun, 19 Apr 2020 10:00:30 +0000 (11:00 +0100)]
BuildLibCalls.h - remove unnecessary TargetLibraryInfo forward declaration. NFC

We already have to include the TargetLibraryInfo.h header.

4 years agoTypeBasedAliasAnalysis.h - replace InstrTypes.h include with forward declaration...
Simon Pilgrim [Sun, 19 Apr 2020 09:55:23 +0000 (10:55 +0100)]
TypeBasedAliasAnalysis.h - replace InstrTypes.h include with forward declaration. NFC.

4 years agoRemove remaining callers of CreateShuffleVector with unsigned indices and mark it...
Benjamin Kramer [Sun, 19 Apr 2020 09:48:28 +0000 (11:48 +0200)]
Remove remaining callers of CreateShuffleVector with unsigned indices and mark it as deprecated

No functionality change intended.

4 years agoOMPConstants.h - replace StringRef.h include with forward declaration. NFC.
Simon Pilgrim [Sun, 19 Apr 2020 09:29:38 +0000 (10:29 +0100)]
OMPConstants.h - replace StringRef.h include with forward declaration. NFC.

4 years ago[ValueLattice] Add struct for merge options.
Florian Hahn [Sun, 19 Apr 2020 07:56:08 +0000 (08:56 +0100)]
[ValueLattice] Add struct for merge options.

This makes it easier to extend the merge options in the future and also
reduces the risk of accidentally setting a wrong option.

Reviewers: efriedma, nikic, reames, davide

Reviewed By: efriedma

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

4 years ago[MLIR] NFC Fix/clarify line in const usage rationale doc
Uday Bondhugula [Sun, 19 Apr 2020 05:40:31 +0000 (11:10 +0530)]
[MLIR] NFC Fix/clarify line in const usage rationale doc

Update misleading line in conclusions. Although the application to IR
objects is stated earlier, the concluding section contradicts it in
isolation.

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

4 years ago[MLIR] Mark dominance methods const
Uday Bondhugula [Sun, 19 Apr 2020 05:21:58 +0000 (10:51 +0530)]
[MLIR] Mark dominance methods const

This change is in line with MLIR's coding style
https://mlir.llvm.org/getting_started/DeveloperGuide/
and also consistent with the dominance methods in LLVM.

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

4 years ago[CallSite removal][PtrUseVisitor] Use visitCallBase instead of visitCallSite. NFC
Craig Topper [Sun, 19 Apr 2020 06:14:59 +0000 (23:14 -0700)]
[CallSite removal][PtrUseVisitor] Use visitCallBase instead of visitCallSite. NFC

4 years ago[SyntheticCountsPropagation] Remove unnecessary includes and add a LLVM license heade...
Craig Topper [Sun, 19 Apr 2020 05:24:55 +0000 (22:24 -0700)]
[SyntheticCountsPropagation] Remove unnecessary includes and add a LLVM license header. NFC

Noticed while looking for CallSite.h uses to remove.

4 years agoFix broken website link: Use absolute URL to point back to the source on GitHub
Mehdi Amini [Sun, 19 Apr 2020 04:54:31 +0000 (04:54 +0000)]
Fix broken website link: Use absolute URL to point back to the source on GitHub

4 years agoFix broken doc links to DefiningAttributesAndTypes.md after move to Tutorials/
Mehdi Amini [Sun, 19 Apr 2020 04:52:37 +0000 (04:52 +0000)]
Fix broken doc links to DefiningAttributesAndTypes.md after move to Tutorials/

4 years agoFix broken doc links to QuickstartRewrites.md after move under Tutorials
Mehdi Amini [Sun, 19 Apr 2020 04:51:03 +0000 (04:51 +0000)]
Fix broken doc links to QuickstartRewrites.md after move under Tutorials

4 years agoFix relative links in Rationale docs following move to subfolder
Mehdi Amini [Sun, 19 Apr 2020 04:47:15 +0000 (04:47 +0000)]
Fix relative links in Rationale docs following move to subfolder

4 years agoFix broken docs links by using relative paths in the Linalg Rationale
Mehdi Amini [Sun, 19 Apr 2020 04:44:49 +0000 (04:44 +0000)]
Fix broken docs links by using relative paths in the Linalg Rationale

4 years agoFix broken doc links (Rationale.md -> Rationale/Rationale.md)
Mehdi Amini [Sun, 19 Apr 2020 04:42:08 +0000 (04:42 +0000)]
Fix broken doc links (Rationale.md -> Rationale/Rationale.md)

4 years agoFix broken docs links (WritingAPass.md was renamed PassManagement.md)
Mehdi Amini [Sun, 19 Apr 2020 04:37:26 +0000 (04:37 +0000)]
Fix broken docs links (WritingAPass.md was renamed PassManagement.md)

4 years ago[Dominators] Facilitate updates to MachinePostDominatorTree
Carl Ritson [Sun, 19 Apr 2020 01:02:58 +0000 (10:02 +0900)]
[Dominators] Facilitate updates to MachinePostDominatorTree

Summary:
Add getBase accessor so that underlying tree can be
manipulated in a similar manner to MachineDominatorTree.

Reviewers: kuhar, arsenm, hliao, nhaehnle

Reviewed By: kuhar

Subscribers: lkail, mgorny, hiraditya, wdng, llvm-commits

Tags: #llvm

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

4 years ago[llvm][NFC] Dereferencing before cast-ing in ProfileSummaryInfoTest
Mircea Trofin [Sun, 19 Apr 2020 00:47:37 +0000 (17:47 -0700)]
[llvm][NFC] Dereferencing before cast-ing in ProfileSummaryInfoTest

Incorporated feedback from https://reviews.llvm.org/D78414

4 years ago[PowerPC] Don't use rldicl for PPC32
LemonBoy [Sat, 18 Apr 2020 19:55:18 +0000 (12:55 -0700)]
[PowerPC] Don't use rldicl for PPC32

According to https://www.ibm.com/support/knowledgecenter/ssw_aix_72/assembler/idalangref_rldicl_rletdw_instrs.html rldicl should not be used when targeting 32bit CPUs.

Reviewed By: #powerpc, nemanjai, MaskRay

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

4 years agoadd more temporary logging for a bot-only failure
Nico Weber [Sun, 19 Apr 2020 00:22:52 +0000 (20:22 -0400)]
add more temporary logging for a bot-only failure

4 years ago[ORC] Add example showing how to initialize/deinitialize a JITDylib with LLJIT.
Lang Hames [Sat, 18 Apr 2020 20:56:13 +0000 (13:56 -0700)]
[ORC] Add example showing how to initialize/deinitialize a JITDylib with LLJIT.

4 years ago[ORC] Add a convenience method to create a JITEvaluatedSymbol from a pointer.
Lang Hames [Sat, 18 Apr 2020 20:54:05 +0000 (13:54 -0700)]
[ORC] Add a convenience method to create a JITEvaluatedSymbol from a pointer.

This can be used to reduce boilerplate code, especially when defining absolute
symbols.

4 years ago[ORC] Replace LLJIT::defineAbsolute with an LLJIT::define convenience method.
Lang Hames [Sat, 18 Apr 2020 04:19:11 +0000 (21:19 -0700)]
[ORC] Replace LLJIT::defineAbsolute with an LLJIT::define convenience method.

LLJIT::defineAbsolute did not mangle its Name argument, which is inconsistent
with the behavior of other LLJIT methods (e.g. lookup). Since it is currently
unused anyway, this commit replaces it with a generic 'define' convenience
method for adding MaterializationUnits to the main JITDylib. This simplifies
use of the generic absoluteSymbols function (as well as the symbolAlias,
reexports and other functions that generate MaterializationUnits) with LLJIT.

4 years ago[LV] Mark first-order recurrences as allowed exits
Ayal Zaks [Wed, 15 Apr 2020 14:04:01 +0000 (17:04 +0300)]
[LV] Mark first-order recurrences as allowed exits

First-order recurrences require special treatment when they are live-out;
such treatment is provided by fixFirstOrderRecurrence(), so they should be
included in AllowedExit set.

(Should probably have been included originally in D16197.)

Fixes PR45526: AllowedExit set is used by prepareToFoldTailByMasking() to
check whether the treatment for live-outs also holds when folding the tail,
which is not (yet) the case for first-order recurrences.

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

4 years agoRecommit "[Local] Simplify the alignment limits in getOrEnforceKnownAlignment. NFCI"
Craig Topper [Sat, 18 Apr 2020 20:28:25 +0000 (13:28 -0700)]
Recommit "[Local] Simplify the alignment limits in getOrEnforceKnownAlignment. NFCI"

With a tweak to avoid a linker error for passing
MaxAlignmentExponent by reference to std::min.

4 years agoUnrollLoop.h - replace StringRef.h/ValueMapper.h includes with forward declarations...
Simon Pilgrim [Fri, 17 Apr 2020 11:40:45 +0000 (12:40 +0100)]
UnrollLoop.h - replace StringRef.h/ValueMapper.h includes with forward declarations. NFC.

4 years ago[ValueLattice] Remove unnecessary ConstVal nulling (NFC)
Nikita Popov [Sat, 18 Apr 2020 20:36:38 +0000 (22:36 +0200)]
[ValueLattice] Remove unnecessary ConstVal nulling (NFC)

ConstVal is not an owned pointer, so setting it to nullptr is not
actually doing anything. If we switch to a state that does not use
ConstVal, the value does not matter.

Split out from D78425.

4 years ago[PredicateInfo] Factor out PredicateInfoBuilder (NFC)
Nikita Popov [Thu, 16 Apr 2020 20:22:14 +0000 (22:22 +0200)]
[PredicateInfo] Factor out PredicateInfoBuilder (NFC)

When running IPSCCP on a module with many small functions, memory
usage is dominated by PredicateInfo, which is a huge structure
(partially due to some unfortunate nested SmallVector use). However,
most of it is actually only temporary state needed to build
predicate info, and does not need to be retained after initial
construction.

This patch factors out the predicate building logic and state
into a separate PrediceInfoBuilder, with the extra bonus that
it does not need to live in the header anymore.

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

4 years agoRevert "[Local] Simplify the alignment limits in getOrEnforceKnownAlignment. NFCI"
Craig Topper [Sat, 18 Apr 2020 20:23:29 +0000 (13:23 -0700)]
Revert "[Local] Simplify the alignment limits in getOrEnforceKnownAlignment. NFCI"

This reverts commit e00cfe254d99629ec344031adfe1878a84f3b0b3.

Seems to be causing a linker error on the build bots.

4 years ago[scudo] Silent warning for u64 -> u32 convertion
kpdev [Fri, 17 Apr 2020 06:26:29 +0000 (09:26 +0300)]
[scudo] Silent warning for u64 -> u32 convertion

Error is raised because of using -Werror=convertion

4 years ago[Local] Simplify the alignment limits in getOrEnforceKnownAlignment. NFCI
Craig Topper [Sat, 18 Apr 2020 18:57:50 +0000 (11:57 -0700)]
[Local] Simplify the alignment limits in getOrEnforceKnownAlignment. NFCI

We previously clamped the trailing zero count to 31 bits. And
then clamped the final alignment to MaximumAlignment which is
1 << 29.

This patch simplifies this to just clamp the trailing zero to
29 using MaxAlignmentExponent.

I was looking into changing this function to use Align/MaybeAlign
and noticed this.

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

4 years ago[DebugInfo] Change DIEnumerator payload type from int64_t to APInt
LemonBoy [Sat, 18 Apr 2020 18:31:38 +0000 (11:31 -0700)]
[DebugInfo] Change DIEnumerator payload type from int64_t to APInt

This allows the representation of arbitrarily large enumeration values.
See https://lists.llvm.org/pipermail/llvm-dev/2017-December/119475.html for context.

Reviewed By: andrewrk, aprantl, MaskRay

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

4 years ago[MLIR] NFC affine for op tiling cleanup / utility rename
Uday Bondhugula [Sat, 18 Apr 2020 10:51:07 +0000 (16:21 +0530)]
[MLIR] NFC affine for op tiling cleanup / utility rename

Rename mlir::tileCodeGen -> mlir::tilePerfectlyNested to be consistent.
NFC clean up tiling utility code, drop dead code, better comments.
Expose isPerfectlyNested and reuse.

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

4 years ago[llvm][NFC][CallSite] Remove CallSite from ProfileSummary
Mircea Trofin [Sat, 18 Apr 2020 02:35:05 +0000 (19:35 -0700)]
[llvm][NFC][CallSite] Remove CallSite from ProfileSummary

Summary: Depends on D78395.

Reviewers: craig.topper, dblaikie, wmi, davidxl

Subscribers: eraman, hiraditya, haicheng, llvm-commits

Tags: #llvm

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

4 years ago[SCCP] Drop unused early exit from visitStoreInst (NFC).
Florian Hahn [Sat, 18 Apr 2020 18:44:54 +0000 (19:44 +0100)]
[SCCP] Drop unused early exit from visitStoreInst (NFC).

There are no lattice values associated with store instructions
directly. They will never get marked as overdefined.

4 years ago[MLIR] Make isPerfectlyNested check more efficient
Uday Bondhugula [Sat, 18 Apr 2020 13:37:19 +0000 (19:07 +0530)]
[MLIR] Make isPerfectlyNested check more efficient

Make mlir::isPerfectlyNested more efficient; use O(1) check instead of
O(N) size() method.

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

4 years ago[llvm-objdump] Demangle C++ Symbols in branch and call targets
Markus Böck [Sat, 18 Apr 2020 15:23:37 +0000 (08:23 -0700)]
[llvm-objdump] Demangle C++ Symbols in branch and call targets

Currently C++ symbols are demangled in the symbol table as well as in
the disassembly and relocations. This patch adds demangling of C++
symbols in targets of calls and branches making it easier to decipher
control flow in disassembly. This also matches up with GNUobjdump's
behavior

Reviewed By: MaskRay

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

4 years ago[libc++] Use proper shell escaping in the executors
Louis Dionne [Fri, 17 Apr 2020 20:43:35 +0000 (16:43 -0400)]
[libc++] Use proper shell escaping in the executors

This was originally committed as f8452ddfcc33 and reverted in 7cb1aa9d9368.
The issue was that shell builtins were being escaped too, and apparently
Bash won't execute a builtin when it is quoted e.g. '!'. Instead, it
thinks it's a command and it can't find it.

Re-committing the change with that issue fixed.

4 years ago[ELF][ARM] Increase default max-page-size from 4096 to 6536
Tobias Hieta [Sat, 18 Apr 2020 15:06:37 +0000 (08:06 -0700)]
[ELF][ARM] Increase default max-page-size from 4096 to 6536

See http://lists.llvm.org/pipermail/llvm-dev/2020-April/140549.html

For the record, GNU ld changed to 64k max page size in 2014
https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=7572ca8989ead4c3425a1500bc241eaaeffa2c89
"[RFC] ld/ARM: Increase maximum page size to 64kB"

Android driver forced 4k page size in AArch64 (D55029) and ARM (D77746).

A binary linked with max-page-size=4096 does not run on a system with a
higher page size configured. There are some systems out there that do
this and it leads to the binary getting `Killed!` by the kernel.

In the non-linker-script cases, when linked with -z noseparate-code
(default), the max-page-size increase should not cause any size
difference. There may be some VMA usage differences, though.

Reviewed By: psmith, MaskRay

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

4 years ago[mlir][vulkan-runner] Simplify vulkan launch call op.
Denis Khalikov [Wed, 15 Apr 2020 19:02:41 +0000 (22:02 +0300)]
[mlir][vulkan-runner] Simplify vulkan launch call op.

Summary:
Workgroup size is written into the kernel. So to properly modelling
vulkan launch, we have to skip local workgroup size for vulkan launch
call op.

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

4 years ago[Object] Change uint32_t getSymbolFlags() to Expected<uint32_t> getSymbolFlags().
vgxbj [Fri, 10 Apr 2020 12:24:21 +0000 (20:24 +0800)]
[Object] Change uint32_t getSymbolFlags() to Expected<uint32_t> getSymbolFlags().

This change enables getSymbolFlags() to return errors which benefit error reporting in clients.

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

4 years ago[SCCP] Add additional tests for structs, conditional prop and widening.
Florian Hahn [Tue, 14 Apr 2020 17:55:39 +0000 (18:55 +0100)]
[SCCP] Add additional tests for structs, conditional prop and widening.

This patch adds a few additional test cases with cases subsequent patches
will improve on.

4 years ago[SCCP] Drop unused early exit from visitReturnInst (NFC).
Florian Hahn [Sat, 18 Apr 2020 12:48:53 +0000 (13:48 +0100)]
[SCCP] Drop unused early exit from visitReturnInst (NFC).

There are no lattice values associated with return instructions
directly. They will never get marked as overdefined.

4 years agoHeatUtils.h - remove unnecessary includes. NFC.
Simon Pilgrim [Sat, 18 Apr 2020 12:36:37 +0000 (13:36 +0100)]
HeatUtils.h - remove unnecessary includes. NFC.
Replace with BlockFrequencyInfo/Function forward declarations
Move BlockFrequencyInfo.h include to HeatUtils.cpp

4 years ago[ValueLattice] Use 8 bits for Tag.
Florian Hahn [Sat, 18 Apr 2020 12:31:17 +0000 (13:31 +0100)]
[ValueLattice] Use 8 bits for Tag.

Suggested as follow-up in D78145 post-commit to be more machine friendly.

4 years ago[CMake][NFC] Clean up CheckAtomic.cmake
Luís Marques [Sat, 18 Apr 2020 11:51:25 +0000 (12:51 +0100)]
[CMake][NFC] Clean up CheckAtomic.cmake

`CheckAtomic.cmake` was skipping the test of whether atomics work in MSVC
without an atomics library (they do), but not setting the value of
`HAVE_CXX_ATOMICS_WITHOUT_LIB`. That caused build issues when trying to land
D69869. I fixed that issue in f128f442a3d, by adding an `elseif(MSVC)`, as
was being done below in the 64-bit atomics check. That minimal fix did work,
but it kept various inconsistencies between the original atomics check and
the 64-bit one. This patch now makes the checks follow the same structure,
cleaning them up.

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

4 years agoIRReader.h - remove unnecessary StringRef forward declaration. NFC.
Simon Pilgrim [Sat, 18 Apr 2020 11:27:02 +0000 (12:27 +0100)]
IRReader.h - remove unnecessary StringRef forward declaration. NFC.

We need to include StringRef.h.

4 years ago[cmake] LLVMPasses - add include/llvm header path
Simon Pilgrim [Sat, 18 Apr 2020 11:09:46 +0000 (12:09 +0100)]
[cmake] LLVMPasses - add include/llvm header path

Pick up all the Pass headers in the root for MSVC projects

4 years ago[cmake] LLVMDWARFLinker - add include/llvm/DWARFLinker header path
Simon Pilgrim [Sat, 18 Apr 2020 11:09:21 +0000 (12:09 +0100)]
[cmake] LLVMDWARFLinker - add include/llvm/DWARFLinker header path

Pick up the DWARFLinker headers in MSVC projects

4 years ago[cmake] LLVMMIRParser - add include/llvm/CodeGen/LLVMMIRParser header path
Simon Pilgrim [Sat, 18 Apr 2020 10:55:01 +0000 (11:55 +0100)]
[cmake] LLVMMIRParser - add include/llvm/CodeGen/LLVMMIRParser header path

Pick up the CodeGen/MIRParser headers in MSVC projects