- Dec 10, 2020
-
-
Scott Linder authored
Revert part of https://reviews.llvm.org/D92084 to make it simpler to start consuming the EndOfStatement token within AMDGPU's ParseInstruction in a future patch. This also brings us back to what every other target currently does. A future change to move the position back to the end of the statement would likely need to audit all of the AMDGPUOperand SMLoc ranges, and determine the SMLoc for the last character of the last operand. Reviewed By: dp Differential Revision: https://reviews.llvm.org/D92960
-
Matt Morehouse authored
The wrapper clears shadow for anything written by recvmsg. Reviewed By: stephan.yichao.zhao Differential Revision: https://reviews.llvm.org/D92949
-
Sam Clegg authored
Followup to https://reviews.llvm.org/D91769 which added support for names globals. Differential Revision: https://reviews.llvm.org/D92909
-
Mircea Trofin authored
Differential Revision: https://reviews.llvm.org/D92943
-
Kirill Bobyrev authored
Figuring out whether the server is responding and debugging issues with remote index setup is no easy task: add verbose logging for client side RPC requests to relieve some pain. Reviewed By: sammccall Differential Revision: https://reviews.llvm.org/D92181
-
Sergei Grechanik authored
This patch fixes a bug that allowed vectorizing of loops with loads and stores having indexing functions varying along different memory dimensions. Reviewed By: aartbik, dcaballe Differential Revision: https://reviews.llvm.org/D92702
-
Peyton, Jonathan L authored
KMP_AFFINITY=norespect was triggering an error because the underlying process affinity mask was not updated to include the entire machine. The Windows documentation states that the thread affinities must be subsets of the process affinity. This patch also moves the printing (for KMP_AFFINITY=verbose) of whether the initial mask was respected out of each topology detection function and to one location where the initial affinity mask is read. Differential Revision: https://reviews.llvm.org/D92587
-
Peyton, Jonathan L authored
Remove the user id component to the shm segment name and just use the pid like before. Differential Revision: https://reviews.llvm.org/D92660
-
Gabor Marton authored
CXXDeductionGuideDecl with a local typedef has its own copy of the TypedefDecl with the CXXDeductionGuideDecl as the DeclContext of that TypedefDecl. ``` template <typename T> struct A { typedef T U; A(U, T); }; A a{(int)0, (int)0}; ``` Related discussion on cfe-dev: http://lists.llvm.org/pipermail/cfe-dev/2020-November/067252.html Without this fix, when we import the CXXDeductionGuideDecl (via VisitFunctionDecl) then before creating the Decl we must import the FunctionType. However, the first parameter's type is the afore mentioned local typedef. So, we then start importing the TypedefDecl whose DeclContext is the CXXDeductionGuideDecl itself. The infinite loop is formed. ``` #0 clang::ASTNodeImporter::VisitCXXDeductionGuideDecl(clang::CXXDeductionGuideDecl*) clang/lib/AST/ASTImporter.cpp:3543:0 #1 clang::declvisitor::Base<std::add_pointer, clang::ASTNodeImporter, llvm::Expected<clang::Decl*> >::Visit(clang::Decl*) /home/egbomrt/WORK/llvm5/build/debug/tools/clang/include/clang/AST/DeclNodes.inc:405:0 #2 clang::ASTImporter::ImportImpl(clang::Decl*) clang/lib/AST/ASTImporter.cpp:8038:0 #3 clang::ASTImporter::Import(clang::Decl*) clang/lib/AST/ASTImporter.cpp:8200:0 #4 clang::ASTImporter::ImportContext(clang::DeclContext*) clang/lib/AST/ASTImporter.cpp:8297:0 #5 clang::ASTNodeImporter::ImportDeclContext(clang::Decl*, clang::DeclContext*&, clang::DeclContext*&) clang/lib/AST/ASTImporter.cpp:1852:0 #6 clang::ASTNodeImporter::ImportDeclParts(clang::NamedDecl*, clang::DeclContext*&, clang::DeclContext*&, clang::DeclarationName&, clang::NamedDecl*&, clang::SourceLocation&) clang/lib/AST/ASTImporter.cpp:1628:0 #7 clang::ASTNodeImporter::VisitTypedefNameDecl(clang::TypedefNameDecl*, bool) clang/lib/AST/ASTImporter.cpp:2419:0 #8 clang::ASTNodeImporter::VisitTypedefDecl(clang::TypedefDecl*) clang/lib/AST/ASTImporter.cpp:2500:0 #9 clang::declvisitor::Base<std::add_pointer, clang::ASTNodeImporter, llvm::Expected<clang::Decl*> >::Visit(clang::Decl*) /home/egbomrt/WORK/llvm5/build/debug/tools/clang/include/clang/AST/DeclNodes.inc:315:0 #10 clang::ASTImporter::ImportImpl(clang::Decl*) clang/lib/AST/ASTImporter.cpp:8038:0 #11 clang::ASTImporter::Import(clang::Decl*) clang/lib/AST/ASTImporter.cpp:8200:0 #12 llvm::Expected<clang::TypedefNameDecl*> clang::ASTNodeImporter::import<clang::TypedefNameDecl>(clang::TypedefNameDecl*) clang/lib/AST/ASTImporter.cpp:165:0 #13 clang::ASTNodeImporter::VisitTypedefType(clang::TypedefType const*) clang/lib/AST/ASTImporter.cpp:1304:0 #14 clang::TypeVisitor<clang::ASTNodeImporter, llvm::Expected<clang::QualType> >::Visit(clang::Type const*) /home/egbomrt/WORK/llvm5/build/debug/tools/clang/include/clang/AST/TypeNodes.inc:74:0 #15 clang::ASTImporter::Import(clang::QualType) clang/lib/AST/ASTImporter.cpp:8071:0 #16 llvm::Expected<clang::QualType> clang::ASTNodeImporter::import<clang::QualType>(clang::QualType const&) clang/lib/AST/ASTImporter.cpp:179:0 #17 clang::ASTNodeImporter::VisitFunctionProtoType(clang::FunctionProtoType const*) clang/lib/AST/ASTImporter.cpp:1244:0 #18 clang::TypeVisitor<clang::ASTNodeImporter, llvm::Expected<clang::QualType> >::Visit(clang::Type const*) /home/egbomrt/WORK/llvm5/build/debug/tools/clang/include/clang/AST/TypeNodes.inc:47:0 #19 clang::ASTImporter::Import(clang::QualType) clang/lib/AST/ASTImporter.cpp:8071:0 #20 llvm::Expected<clang::QualType> clang::ASTNodeImporter::import<clang::QualType>(clang::QualType const&) clang/lib/AST/ASTImporter.cpp:179:0 #21 clang::QualType clang::ASTNodeImporter::importChecked<clang::QualType>(llvm::Error&, clang::QualType const&) clang/lib/AST/ASTImporter.cpp:198:0 #22 clang::ASTNodeImporter::VisitFunctionDecl(clang::FunctionDecl*) clang/lib/AST/ASTImporter.cpp:3313:0 #23 clang::ASTNodeImporter::VisitCXXDeductionGuideDecl(clang::CXXDeductionGuideDecl*) clang/lib/AST/ASTImporter.cpp:3543:0 ``` The fix is to first create the TypedefDecl and only then start to import the DeclContext. Basically, we could do this during the import of all other Decls (not just for typedefs). But it seems, there is only one another AST construct that has a similar cycle: a struct defined as a function parameter: ``` int struct_in_proto(struct data_t{int a;int b;} *d); ``` In that case, however, we had decided to return simply with an error back then because that seemed to be a very rare construct. Differential Revision: https://reviews.llvm.org/D92209 -
Richard Smith authored
-
Richard Smith authored
This attribute permits a typedef to be associated with a class template specialization as a preferred way of naming that class template specialization. This permits us to specify that (for example) the preferred way to express 'std::basic_string<char>' is as 'std::string'. The attribute is applied to the various class templates in libc++ that have corresponding well-known typedef names. This is a re-commit. The previous commit was reverted because it exposed a pre-existing bug that has since been fixed / worked around; see PR48434. Differential Revision: https://reviews.llvm.org/D91311
-
Richard Smith authored
Ensure that we can deserialize a TypedefType even while in the middle of deserializing its TypedefDecl, by removing the need to look at the TypedefDecl while constructing the TypedefType. This fixes all the currently-known failures for PR48434, but it's not a complete fix, because we can still trigger deserialization cycles, which are not supposed to happen.
-
Fangrui Song authored
-
Duncan P. N. Exon Smith authored
Add a `FileEntryRef` overload of `SourceManager::translateFile`, and migrate `ParseDirective` in VerifyDiagnosticConsumer.cpp to use it and the corresponding overload of `createFileID`. No functionality change here. Differential Revision: https://reviews.llvm.org/D92699
-
Peter Collingbourne authored
Quarantines have always been broken when MTE is enabled because the quarantine batch allocator fails to reset tags that may have been left behind by a user allocation. This was only noticed when running the Scudo unit tests with Scudo as the system allocator because quarantines are turned off by default on Android and the test binary turns them on by defining __scudo_default_options, which affects the system allocator as well. Differential Revision: https://reviews.llvm.org/D92881
-
Peter Collingbourne authored
Separate the IRG part from the STZG part since we will need to use the latter on its own for some upcoming changes. Differential Revision: https://reviews.llvm.org/D92880
-
Florian Hahn authored
Add builtins required to implement vcmla and rotated variants from the ACLE Reviewed By: t.p.northover Differential Revision: https://reviews.llvm.org/D92929
-
Jon Chesterfield authored
-
Michael Munday authored
Regenerated using: ./llvm/utils/update_llc_test_checks.py -u llvm/test/CodeGen/RISCV/*.ll This has added comments to spill-related instructions and added @plt to some symbols. Differential Revision: https://reviews.llvm.org/D92841
-
Jianzhou Zhao authored
************* * The problem ************* See motivation examples in compiler-rt/test/dfsan/pair.cpp. The current DFSan always uses a 16bit shadow value for a variable with any type by combining all shadow values of all bytes of the variable. So it cannot distinguish two fields of a struct: each field's shadow value equals the combined shadow value of all fields. This introduces an overtaint issue. Consider a parsing function std::pair<char*, int> get_token(char* p); where p points to a buffer to parse, the returned pair includes the next token and the pointer to the position in the buffer after the token. If the token is tainted, then both the returned pointer and int ar tainted. If the parser keeps on using get_token for the rest parsing, all the following outputs are tainted because of the tainted pointer. The CL is the first change to address the issue. ************************** * The proposed improvement ************************** Eventually all fields and indices have their own shadow values in variables and memory. For example, variables with type {i1, i3}, [2 x i1], {[2 x i4], i8}, [2 x {i1, i1}] have shadow values with type {i16, i16}, [2 x i16], {[2 x i16], i16}, [2 x {i16, i16}] correspondingly; variables with primary type still have shadow values i16. *************************** * An potential implementation plan *************************** The idea is to adopt the change incrementially. 1) This CL Support field-level accuracy at variables/args/ret in TLS mode, load/store/alloca still use combined shadow values. After the alloca promotion and SSA construction phases (>=-O1), we assume alloca and memory operations are reduced. So if struct variables do not relate to memory, their tracking is accurate at field level. 2) Support field-level accuracy at alloca 3) Support field-level accuracy at load/store These two should make O0 and real memory access work. 4) Support vector if necessary. 5) Support Args mode if necessary. 6) Support passing more accurate shadow values via custom functions if necessary. *************** * About this CL. *************** The CL did the following 1) extended TLS arg/ret to work with aggregate types. This is similar to what MSan does. 2) implemented how to map between an original type/value/zero-const to its shadow type/value/zero-const. 3) extended (insert|extract)value to use field/index-level progagation. 4) for other instructions, propagation rules are combining inputs by or. The CL converts between aggragate and primary shadow values at the cases. 5) Custom function interfaces also need such a conversion because all existing custom functions use i16. It is unclear whether custome functions need more accurate shadow propagation yet. 6) Added test cases for aggregate type related cases. Reviewed-by: morehouse Differential Revision: https://reviews.llvm.org/D92261 -
Jon Chesterfield authored
-
Jon Chesterfield authored
-
Reid Kleckner authored
Swiftcall does it's own target-independent argument type classification, since it is not designed to be ABI compatible with anything local on the target that isn't LLVM-based. This means it never uses inalloca. However, we have duplicate logic for checking for inalloca parameters that runs before call argument setup. This logic needs to know ahead of time if inalloca will be used later, and we can't move the CGFunctionInfo calculation earlier. This change gets the calling convention from either the FunctionProtoType or ObjCMethodDecl, checks if it is swift, and if so skips the stackbase setup. Depends on D92883. Differential Revision: https://reviews.llvm.org/D92944
-
Reid Kleckner authored
This template exists to abstract over FunctionPrototype and ObjCMethodDecl, which have similar APIs for storing parameter types. In place of a template, use a PointerUnion with two cases to handle this. Hopefully this improves readability, since the type of the prototype is easier to discover. This allows me to sink this code, which is mostly assertions, out of the header file and into the cpp file. I can also simplify the overloaded methods for computing isGenericMethod, and get rid of the second EmitCallArgs overload. Differential Revision: https://reviews.llvm.org/D92883
-
Raphael Isemann authored
NFC preparation for another patch. Also add some documentation for why the error value is true (and not false).
-
Jon Chesterfield authored
-
Justin Bogner authored
This method previously always recursively checked both the left-hand side and right-hand side of binary operations for splatted (broadcast) vector values to determine if the parent DAG node is a splat. Like several other SelectionDAG methods, limit the recursion depth to MaxRecursionDepth (6). This prevents stack overflow. See also https://issuetracker.google.com/173785481 Patch by Nicolas Capens. Thanks! Differential Revision: https://reviews.llvm.org/D92421
-
Alexey Bader authored
To support llorg builds this patch provides the following changes: 1) Added cmake variable ITTAPI_GIT_REPOSITORY to control the location of ITTAPI repository. Default value of ITTAPI_GIT_REPOSITORY is github location: https://github.com/intel/ittapi.git Also, the separate cmake variable ITTAPI_GIT_TAG was added for repo tag. 2) Added cmake variable ITTAPI_SOURCE_DIR to control the place where the repo will be cloned. Default value of ITTAPI_SOURCE_DIR is build area: PROJECT_BINARY_DIR Reviewed By: etyurin, bader Patch by ekovanov. Differential Revision: https://reviews.llvm.org/D91935 -
Arthur Eubanks authored
This was accidentally reverted by a later change. LSR currently only runs in the codegen pass manager. There are a couple issues with LSR and the NPM. 1) Lots of tests assume that LCSSA isn't run before LSR. This breaks a bunch of tests' expected output. This is fixable with some time put in. 2) LSR doesn't preserve LCSSA. See llvm/test/Analysis/MemorySSA/update-remove-deadblocks.ll. LSR's use of SCEVExpander is the only use of SCEVExpander where the PreserveLCSSA option is off. Turning it on causes some code sinking out of loops to fail due to SCEVExpander's inability to handle the newly created trivial PHI nodes in the broken critical edge (I was looking at llvm/test/Transforms/LoopStrengthReduce/X86/2011-11-29-postincphi.ll). I also tried simply just calling formLCSSA() at the end of LSR, but the extra PHI nodes cause regressions in codegen tests. We'll delay figuring these issues out until later. This causes the number of check-llvm failures with -enable-new-pm true by default to go from 60 to 29. Reviewed By: asbirlea Differential Revision: https://reviews.llvm.org/D92796
-
Fangrui Song authored
Otherwise `check-llvm-*` may not rebuild llvm-profgen, causing llvm-profgen tests to fail if llvm-profgen happens to be stale.
-
Jonas Devlieghere authored
The reproducers currently use a static variable to track the API boundary. This is obviously incorrect when the SB API is used concurrently. While I do not plan to support that use-case (right now), I do want to avoid us crashing. As a first step, correctly track API boundaries across multiple threads. Before this patch SB API calls made by the embedded script interpreter would be considered "behind the API boundary" and correctly ignored. After this patch, we need to tell the reproducers to ignore the scripting thread as a "private thread". Differential revision: https://reviews.llvm.org/D92811
-
Arthur Eubanks authored
Reviewed By: hans Differential Revision: https://reviews.llvm.org/D92866
-
Mircea Trofin authored
Explicitly opt-out llvm/test/Transforms/Attributor. Verified by flipping the default value of allow-unused-prefixes and observing that none of the failures were under llvm/test/Transforms. Differential Revision: https://reviews.llvm.org/D92404
-
Sam McCall authored
This is a step towards making compile_commands.json reloadable. The idea is: - in addition to rare CDB loads we're soon going to have somewhat-rare CDB reloads and fairly-common stat() of files to validate the CDB - so stop doing all our work under a big global lock, instead using it to acquire per-directory structures with their own locks - each directory can be refreshed from disk every N seconds, like filecache - avoid locking these at all in the most common case: directory has no CDB Differential Revision: https://reviews.llvm.org/D92381
-
Louis Dionne authored
The goal was to add coverage for back-deployment over the filesystem library, but it was added in macOS 10.15, not 10.14. Differential Revision: https://reviews.llvm.org/D92937
-
LLVM GN Syncbot authored
-
LLVM GN Syncbot authored
-
LLVM GN Syncbot authored
-
Adam Czachorowski authored
No changes to the tests themselves, other than some auto -> const auto diagnostic fixes and formatting. Differential Revision: https://reviews.llvm.org/D92939
-
Kazushi (Jam) Marukawa authored
Add vsum and vfsum intrinsic instructions and regression tests. Reviewed By: simoll Differential Revision: https://reviews.llvm.org/D92938
-