- Aug 27, 2019
-
-
Reid Kleckner authored
This reverts r369486 (git commit 8d183848) The opt-viewer tests don't pass after this change, and fixing them isn't trivial. opt-viewer.py imports optmap, which requires adjusting pythonpath, which is more work than I'm willing to do to fix forward. llvm-svn: 370095
-
Praveen Velliengiri authored
Summary: This patch introduces, SequenceBBQuery - new heuristic to find likely next callable functions it tries to find the blocks with calls in order of execution sequence of Blocks. It still uses BlockFrequencyAnalysis to find high frequency blocks. For a handful of hottest blocks (plan to customize), the algorithm traverse and discovered the caller blocks along the way to Entry Basic Block and Exit Basic Block. It uses Block Hint, to stop traversing the already visited blocks in both direction. It implicitly assumes that once the block is visited during discovering entry or exit nodes, revisiting them again does not add much. It also branch probability info (cached result) to traverse only hot edges (planned to customize) from hot blocks. Without BPI, the algorithm mostly return's all the blocks in the CFG with calls. It also changes the heuristic queries, so they don't maintain states. Hence it is safe to call from multiple threads. It also implements, new instrumentation to avoid jumping into JIT on every call to the function with the help _orc_speculate.decision.block and _orc_speculate.block. "Speculator Registration Mechanism is also changed" - kudos to @lhames Open to review, mostly looking to change implementation of SequeceBBQuery heuristics with good data structure choices. Reviewers: lhames, dblaikie Reviewed By: lhames Subscribers: mgorny, hiraditya, mgrang, llvm-commits, lhames Tags: #speculative_compilation_in_orc, #llvm Differential Revision: https://reviews.llvm.org/D66399 llvm-svn: 370092
-
Andrea Di Biagio authored
Before this patch, users were not allowed to optionally mark processor resource groups as load/store queues. That is because tablegen class MemoryQueue was originally declared as expecting a ProcResource template argument (instead of a more generic ProcResourceKind). That was an oversight, since the original intention from D54957 was to let user mark any processor resource as either load/store queue. This patch adds the ability to use processor resource groups in MemoryQueue definitions. This is not a user visible change. Differential Revision: https://reviews.llvm.org/D66810 llvm-svn: 370091
-
Matt Arsenault authored
llvm-svn: 370089
-
Lang Hames authored
llvm-svn: 370088
-
Matt Arsenault authored
This is something of a workaround since computeRegisterProperties seems to be doing the wrong thing. llvm-svn: 370086
-
Praveen Velliengiri authored
Summary: CFGWalk Query is unimplemented for valid reasons. But the declaration got included in commit file. Reviewers: lhames, dblaikie Reviewed By: dblaikie Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66289 llvm-svn: 370085
-
Jessica Paquette authored
I thought `llvm::sort` was stable for some reason but it's not. Use `llvm::stable_sort` in `CodeGenTarget::getSuperRegForSubReg`. Original patch: https://reviews.llvm.org/D66498 llvm-svn: 370084
-
Amy Huang authored
32 bit unsigned, and 64 bit pointers. llvm-svn: 370083
-
Jessica Paquette authored
When EXPENSIVE_CHECKS are enabled, GlobalISelEmitterSubreg.td doesn't get stable output. Reverting while I debug it. See: https://reviews.llvm.org/D66498 llvm-svn: 370080
-
Craig Topper authored
[X86] Remove encoding information from the TAILJMP instructions that are lowered by MCInstLowering. Fix LowerPATCHABLE_TAIL_CALL to also convert them to regular JMP/JCC instructions There are 5 instructions here that are converted from TAILJMP opcodes to regular JMP/JCC opcodes during MCInstLowering. So normally there encoding information isn't used. The exception being when XRay wraps them in PATCHABLE_TAIL_CALL. For the ones that weren't already handled in MCInstLowering, add handling for those and remove their encoding information. This patch fixes PATCHABLE_TAIL_CALL to do the same opcode conversion as the regular lowering patch. Then removes the encoding information. Differential Revision: https://reviews.llvm.org/D66561 llvm-svn: 370079
-
Lang Hames authored
The timers track time spent loading objects, linking, and (if applicable) running JIT-link'd code. llvm-svn: 370075
-
Lang Hames authored
On MachO, processing of the eh-frame section should stop if the end of the __eh_frame section is reached, regardless of whether or not there is a null CFI length field at the end of the section. This patch tracks the eh-frame section size and threads it through the appropriate APIs so that processing can be terminated correctly. No testcase yet: This patch is all API plumbing (rather than modification of linked memory) which the existing infrastructure does not provide a way of testing. Committing without a testcase until I have an idea of how to write one. llvm-svn: 370074
-
Lang Hames authored
If content sections have lower alignment than zero-fill sections then bump the overall segment alignment to avoid under-aligning the zero-fill sections. llvm-svn: 370072
-
Sanjay Patel authored
(-X) * (-Y) + Z --> X * Y + Z This is a missing optimization that shows up as a potential regression in D66050, so we should solve it first. We appear to be partly missing this fold in IR as well. We do handle the simpler case already: (-X) * (-Y) --> X * Y And it might be beneficial to make the constraint less conservative (eg, if both operands are cheap, but not necessarily cheaper), but that causes infinite looping for the existing fmul transform. Differential Revision: https://reviews.llvm.org/D66755 llvm-svn: 370071
-
Jason Liu authored
Summary: Adds support for emitting common local global symbols to an XCOFF object file. Local commons are emitted into the .bss section with a storage class of C_HIDEXT. Patch by: daltenty Reviewers: sfertile, hubert.reinterpretcast Differential Revision: https://reviews.llvm.org/D66097 llvm-svn: 370070
-
Jinsong Ji authored
This reverts commit b3d258fc. @skatkov is reporting crash in D63972#1646303 Contacted @ZhangKang, and revert the commit on behalf of him. llvm-svn: 370069
-
Petar Avramovic authored
ClampScalar G_SHL, G_ASHR and G_LSHR to s32 for MIPS32. Differential Revision: https://reviews.llvm.org/D66533 llvm-svn: 370067
-
Petar Avramovic authored
Main difference is in the way Hi for Long shift (HiL) is made. G_LSHR fills HiL with zeros, while G_ASHR fills HiL with sign bit value. Differential Revision: https://reviews.llvm.org/D66589 llvm-svn: 370064
-
Petar Avramovic authored
Fix typos. Use Hi and Lo prefixes for Or instead of LHS and RHS to match names of surrounding variables. Differential Revision: https://reviews.llvm.org/D66587 llvm-svn: 370062
-
Amaury Sechet authored
Summary: As per title. Reviewers: craig.topper, efriedma, RKSimon, lebedev.ri Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66659 llvm-svn: 370056
-
Simon Pilgrim authored
Differential Revision: https://reviews.llvm.org/D66527 llvm-svn: 370055
-
Cullen Rhodes authored
Summary: This patch adds support for scalable vectors in intrinsics, enabling intrinsics such as the following to be defined: declare <vscale x 4 x i32> @llvm.something.nxv4i32(<vscale x 4 x i32>) Support for this is implemented by defining a new type descriptor for scalable vectors and adding mangling support for scalable vector types in the name mangling scheme used by 'any' types in intrinsic signatures. Tests have been added for IRBuilder to test scalable vectors work as expected when using intrinsics through this interface. This required implementing an intrinsic that is explicitly defined with scalable vectors, e.g. LLVMType<nxv4i32>, an SVE floating-point convert intrinsic was used for this. The behaviour of the overloaded type LLVMScalarOrSameVectorWidth with scalable vectors is tested using the existing masked load intrinsic. Also added an .ll test to test the Verifier catches a bad intrinsic argument when passing a fixed-width predicate (mask) to the masked.load intrinsic where a scalable is expected. Patch by Paul Walker Reviewed By: sdesmalen Differential Revision: https://reviews.llvm.org/D65930 llvm-svn: 370053
-
David Bolvansky authored
llvm-svn: 370046
-
Pavel Labath authored
Summary: This is motivated by D63591, where we realized that there isn't a really good way of telling whether a DataExtractor is reading actual data, or is it just returning default values because it reached the end of the buffer. This patch resolves that by providing a new "Cursor" class. A Cursor object encapsulates two things: - the current position/offset in the DataExtractor - an error object Storing the error object inside the Cursor enables one to use the same pattern as the std::{io}stream API, where one can blindly perform a sequence of reads and only check for errors once at the end of the operation. Similarly to the stream API, as soon as we encounter one error, all of the subsequent operations are skipped (return default values) too, even if the would suceed with clear error state. Unlike the std::stream API (but in line with other llvm APIs), we force the error state to be checked through usage of llvm::Error. Reviewers: probinson, dblaikie, JDevlieghere, aprantl, echristo Subscribers: kristina, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D63713 llvm-svn: 370042
-
Amaury Sechet authored
Summary: As per title. Reviewers: craig.topper, efriedma, RKSimon, lebedev.ri Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66702 llvm-svn: 370040
-
David Bolvansky authored
Summary: Handle pattern [0]: int ctz(unsigned int a) { int c = __clz(a & -a); return a ? 31 - c : c; } In reality, the compiler can generate much better code for cttz, so fold away this pattern. https://godbolt.org/z/c5kPtV [0] https://community.arm.com/community-help/f/discussions/2114/count-trailing-zeros Reviewers: spatel, nikic, lebedev.ri, dmgreen, hfinkel Reviewed By: hfinkel Subscribers: hfinkel, javed.absar, kristof.beyls, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66308 llvm-svn: 370037
-
Tim Northover authored
Inserting a value into Visited has the effect of terminating a search for predecessors if that node is seen. This is legitimate for the base address, and acts as a slight performance optimization, but the vector-building node can be paert of a legitimate cycle so we shouldn't stop searching there. PR43056. llvm-svn: 370036
-
George Rimar authored
There is a problem with reportError we have. Declaration says we have ArchiveName that follows the FileName: reportError(Error E, StringRef FileName, StringRef ArchiveName,... Though implementation have them reversed. I cleaned it up and removed an excessive reportError(Error E, StringRef File) version. Rebased on top of D66418. Differential revision: https://reviews.llvm.org/D66517 llvm-svn: 370034
-
George Rimar authored
This is a follow up discussed in the comments of D66583. Currently, if for example, we have both StOther and Other set in YAML document for a symbol, then yaml2obj reports an "unknown key 'Other'" error. It happens because 'mapOptional()' is never called for 'Other/Visibility' in this case, leaving those unhandled. This message does not describe the reason of the error well. This patch fixes it. Differential revision: https://reviews.llvm.org/D66642 llvm-svn: 370032
-
Craig Topper authored
ConstantDataVector is a specialized verison of ConstantVector that stores data in a packed array of bits instead of as individual pointers to other Constants. But we really shouldn't expose that if we can void it. And we should handle regular ConstantVector equally well. This removes a dyn_cast to ConstantDataVector and just calls getSplatValue directly on a Constant* if the type is a vector. llvm-svn: 370018
-
Craig Topper authored
llvm-svn: 370017
-
Hideto Ueno authored
This commit was part of D65402. llvm-svn: 370016
-
Hideto Ueno authored
Summary: Similar to `^=` operator for IntegerState, this patch introduces a `+=` operator to "clamp" known information. Reviewers: jdoerfert, sstefan1 Reviewed By: jdoerfert Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66635 llvm-svn: 370015
-
Johannes Doerfert authored
Summary: During the fixpoint iteration, including the manifest stage, we should not delete stuff as other abstract attributes might have a reference to the value. Through the API this can now be done safely at the very end. Reviewers: uenoku, sstefan1 Subscribers: hiraditya, bollu, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66779 llvm-svn: 370014
-
Philip Reames authored
The current approach is restrictive (as all of geps must be multiples of the alignment), but correct. llvm-svn: 370013
-
Richard Trieu authored
This change causes instrumented builds of Clang to have a fatal error in the backend. https://reviews.llvm.org/D66537 has the details. llvm-svn: 370006
-
Pengfei Wang authored
Summary: This is an alternate approach to D63396 Currently funclets reuse the same stack slots that are used in the parent function for saving callee-saved xmm registers. If the parent function modifies a callee-saved xmm register before an excpetion is thrown, the catch handler will overwrite the original saved value. This patch allocates space in funclets stack for saving callee-saved xmm registers and uses RSP instead RBP to access memory. Signed-off-by:
Pengfei Wang <pengfei.wang@intel.com> Reviewers: rnk, RKSimon, craig.topper, annita.zhang, LuoYuanke, andrew.w.kaylor Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66596 Signed-off-by:
Pengfei Wang <pengfei.wang@intel.com> llvm-svn: 370005
-
Craig Topper authored
[Analysis] In EmitGEPOffset, use Constant::getUniqueInteger to handle struct indices in vector GEPs. We previously called getSplatValue if the index had a vector type, but getSplatValue returns null for non-splats. This would cause a nullptr dereference if it wasn't a splat. Using getUniqueInteger gives us an assert if its a vector type, but the value isn't a splat. This is what is used in SelectionDAGBuilder's code that expands GEPs as well. llvm-svn: 370001
-
Alina Sbirlea authored
Actually call the renamePass on inserted Phis. Fixes PR42940. Subscribers: llvm-commits llvm-svn: 369997
-