- Dec 16, 2020
-
-
Sebastian Neubauer authored
I think the global_load/store_dword_addtid instructions support switching off the scalar address. Add assembler and disassembler support for this. Differential Revision: https://reviews.llvm.org/D93288
-
Jan Svoboda authored
Depends on D83697. Reviewed By: dexonsmith Differential Revision: https://reviews.llvm.org/D83892
-
Alexander Belyaev authored
The current condition implies that the target materialization will be called even if the type is the new operand type is legal, but slightly different. For example, if there is a bufferization pattern that changes memref layout, then target materialization for an illegal type (TensorType) would be called. Differential Revision: https://reviews.llvm.org/D93126
-
Jan Svoboda authored
If both flags created through BoolOption are CC1Option and the keypath has a non-default or non-implied value, the denormalizer gets called twice. If the denormalizer has the ability to generate both flags, we can end up generating the same flag twice. Reviewed By: dexonsmith, Bigcheese Differential Revision: https://reviews.llvm.org/D93094
-
Jan Svoboda authored
We cannot be sure whether a flag is CC1Option inside the definition of `BoolOption`. Take the example below: ``` let Flags = [CC1Option] in { defm xxx : BoolOption<...>; } ``` where TableGen applies `Flags = [CC1Option]` to the `xxx` and `no_xxx` records **after** they have been is fully declared by `BoolOption`. For the refactored `-f[no-]debug-pass-manager` flags (see the diff), this means `BoolOption` never adds any marshalling info, as it doesn't see either of the flags as `CC1Option`. For that reason, we should defensively append the marshalling information to both flags inside `BoolOption`. Now the check for `CC1Option` needs to happen later, in the parsing macro, when all TableGen logic has been resolved. However, for some flags defined through `BoolOption`, we can run into issues: ``` // Options.td def fenable_xxx : /* ... */; // Both flags are CC1Option, the first is implied. defm xxx : BoolOption<"xxx, "Opts.Xxx", DefaultsToFalse, ChangedBy<PosFlag, [CC1Option], "", [fenable_xxx]>, ResetBy<NegFlag, [CC1Option]>>; ``` When parsing `clang -cc1 -fenable-xxx`: * we run parsing for `PosFlag`: * set `Opts.Xxx` to default `false`, * discover `PosFlag` is implied by `-fenable-xxx`: set `Opts.Xxx` to `true`, * don't see `-fxxx` on command line: do nothing, * we run parsing for `NegFlag`: * set `Opts.Xxx` to default `false`, * discover `NegFlag` cannot be implied: do nothing, * don't see `-fno-xxx` on command line: do nothing. Now we ended up with `Opts.Xxx` set to `false` instead of `true`. For this reason, we need to ensure to append the same `ImpliedByAnyOf` instance to both flags. This means both parsing runs now behave identically (they set the same default value, run the same "implied by" check, and call `makeBooleanOptionNormalizer` that already has information on both flags, so it returns the same value in both calls). The solution works well, but what might be confusing is this: you have defined a flag **A** that is not `CC1Option`, but can be implied by another flag **B** that is `CC1Option`: * if **A** is defined manually, it will never get implied, as the code never runs ``` def no_signed_zeros : Flag<["-"], "fno-signed-zeros">, Group<f_Group>, Flags<[]>, MarshallingInfoFlag<"LangOpts->NoSignedZero">, ImpliedByAnyOf<[menable_unsafe_fp_math]>; ``` * if **A** is defined by `BoolOption`, it could get implied, as the code is run by its `CC1Option` counterpart: ``` defm signed_zeros : BoolOption<"signed-zeros", "LangOpts->NoSignedZero", DefaultsToFalse, ChangedBy<NegFlag, [], "Allow optimizations that ignore the sign of floating point zeros", [cl_no_signed_zeros, menable_unsafe_fp_math]>, ResetBy<PosFlag, [CC1Option]>, "f">, Group<f_Group>; ``` This is a surprising inconsistency. One solution might be to somehow propagate the final `Flags` of the implied flag in `ImpliedByAnyOf` and check whether it has `CC1Option` in the parsing macro. However, I think it doesn't make sense to spend time thinking about a corner case that won't come up in real code. An observation: it is unfortunate that the marshalling information is a part of the flag definition. If we represented it in a separate structure, we could avoid the "double parsing" problem by having a single source of truth. This would require a lot of additional work though. Note: the original patch missed the `CC1Option` check in the parsing macro, making my reasoning here incomplete. Moreover, it contained a change to denormalization that wasn't necessarily related to these changes, so I've extracted that to a follow-up patch: D93094. Reviewed By: dexonsmith, Bigcheese Differential Revision: https://reviews.llvm.org/D93008 -
Raul Tambre authored
039cb03d (D93378) fixed the assembly separator, so the workaround is no longer necessary. This reverts commit 3000c19d. Differential Revision: https://reviews.llvm.org/D93379
-
Fangrui Song authored
`;` is the default comment marker, which is also used by powerpc*-*-elf target triples. `@` is the comment marker of powerpc*-*-darwin but the Darwin support has been deleted for PowerPC (D72063). `%%` is the statement separator used by aarch64-*-darwin (see AArch64MCAsmInfoDarwin, it uses `;` as the comment marker, which is different from most other targets) Reviewed By: tambre Differential Revision: https://reviews.llvm.org/D93378
-
Siva Chandra Reddy authored
-
Stanislav Mekhanoshin authored
Differential Revision: https://reviews.llvm.org/D93353
-
Siva Chandra Reddy authored
The name `nan` conflicts with the function `nan` defined declared in math.h.
-
Siva Chandra Reddy authored
-
Yaxun (Sam) Liu authored
There is a use case that users want to emit preprocessor output as file and compile the preprocessor output later with -x hip-cpp-output. Clang emits bundled preprocessor output when users compile with -E for combined host/device compilations. Clang should be able to compile the bundled preprocessor output with -x hip-cpp-output. Basically clang should unbundle the bundled preprocessor output and launch device and host compilation actions. Currently there is a bug in clang driver causing bundled preprocessor output not unbundled. This patch fixes that. Differential Revision: https://reviews.llvm.org/D92720
-
Philip Reames authored
Account for the fact that (in the future) the latch might be a switch not a branch. The existing code is correct, minus the assert.
-
Lang Hames authored
Separates link graph creation from linking. This allows raw LinkGraphs to be created and passed to a link. ObjectLinkingLayer is updated to support emission of raw LinkGraphs in addition to object buffers. Raw LinkGraphs can be created by in-memory compilers to bypass object encoding / decoding (though this prevents caching, as LinkGraphs have do not have an on-disk representation), and by utility code to add programatically generated data structures to the JIT target process.
-
Zakk Chen authored
Refine tablegen pattern for vector load/store, and follow D93012 to separate masked and unmasked definitions for pseudo load/store instructions. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D93284
-
Philip Reames authored
Given we haven't yet enabled multiple exiting blocks, this is currently non functional, but it's an obvious extension which cleans up a later patch. I don't think this is worth review (as it's pretty obvious), if anyone disagrees, feel feel to revert or comment and I will.
-
Nathan James authored
-
peter klausler authored
STORAGE_SIZE() is a standard inquiry intrinsic (size in bits of an array element of the same type as the argument); SIZEOF() is a common extension that returns the size in bytes of its argument; C_SIZEOF() is a renaming of SIZEOF() in module ISO_C_BINDING. STORAGE_SIZE() and SIZEOF() are implemented via rewrites to expressions; these expressions will be constant when the necessary type parameters and bounds are also constant. Code to calculate the sizes of types (with and without alignment) was isolated into Evaluate/type.* and /characteristics.*. Code in Semantics/compute-offsets.* to calculate sizes and alignments of derived types' scopes was exposed so that it can be called at type instantiation time (earlier than before) so that these inquiry intrinsics could be called from specification expressions. Differential Revision: https://reviews.llvm.org/D93322
-
Krzysztof Parzyszek authored
-
Krzysztof Parzyszek authored
-
Krzysztof Parzyszek authored
-
Nico Weber authored
-
Nico Weber authored
Not sure if anything actually depends on this, but it makes `otool -L` output look nicer. Differential Revision: https://reviews.llvm.org/D93332
-
peter klausler authored
Pointers must have deferred shapes, so CheckConformance must be extended to allow for them. Differential Revision: https://reviews.llvm.org/D93320
-
Nico Weber authored
PackedVersion already does the correct range checks. No behavior change. Differential Revision: https://reviews.llvm.org/D93338
-
Tim Keith authored
When merging use associations into a generic, we weren't handling the case where the name that was use associated was itself a use association. This is fixed by following that association to its ultimate symbol (`useUltimate` in `DoAddUse`). An example of the bug is `m12d` in `resolve17.f90`. `g` is associated with `gc` in `m12c` which is associated with `gb` in `m12b`. It was that last association that we weren't correctly following. Differential Revision: https://reviews.llvm.org/D93343
-
LLVM GN Syncbot authored
-
Johannes Doerfert authored
There is a build error with gcc-5 [0], investigating now. [0] https://reviews.llvm.org/D91980#2456526 This reverts commit a5a14cbe.
-
Reid Kleckner authored
Differential Revision: https://reviews.llvm.org/D93355
-
Tres Popp authored
Previous behavior would fail if inserting an operation that already existed. Now SymbolTable::insert can also be used as a way to make a symbol's name unique even after insertion. Further TODOs have been left over naming and consistent behavior considerations. Differential Revision: https://reviews.llvm.org/D93349
-
Bangtian Liu authored
This PR implements the function splitBasicBlockBefore to address an issue that occurred during SplitEdge(BB, Succ, ...), inside splitBlockBefore. The issue occurs in SplitEdge when the Succ has a single predecessor and the edge between the BB and Succ is not critical. This produces the result ‘BB->Succ->New’. The new function splitBasicBlockBefore was added to splitBlockBefore to handle the issue and now produces the correct result ‘BB->New->Succ’. Below is an example of splitting the block bb1 at its first instruction. /// Original IR bb0: br bb1 bb1: %0 = mul i32 1, 2 br bb2 bb2: /// IR after splitEdge(bb0, bb1) using splitBasicBlock bb0: br bb1 bb1: br bb1.split bb1.split: %0 = mul i32 1, 2 br bb2 bb2: /// IR after splitEdge(bb0, bb1) using splitBasicBlockBefore bb0: br bb1.split bb1.split br bb1 bb1: %0 = mul i32 1, 2 br bb2 bb2: Differential Revision: https://reviews.llvm.org/D92200 -
Stephen Kelly authored
-
Stephen Kelly authored
A callExpr whose argument is dependent has a null getCalleeDecl(). Differential Revision: https://reviews.llvm.org/D93324
-
Johannes Doerfert authored
-
Harald van Dijk authored
The REX prefix is needed to allow linker relaxations: even if the instruction we emit may not need it, the linker may change it to a different instruction which does need it.
-
River Riddle authored
This parser does not include the general `pass_pipeline` option, the pass pipeline entries, or the options of pass entries. This is useful for cases such as `print-ir-after` that just want the user to select specific pass types. This revision greatly reduces the amount of text in --help for several MLIR based tools. Fixes PR#45495 Differential Revision: https://reviews.llvm.org/D92987
-
Richard Smith authored
of type- and value-dependency. A static data member initialized to a constant inside a class template is no longer considered value-dependent, per DR1413. A const but not constexpr variable of literal type (other than integer or enumeration) is no longer considered value-dependent, per P1815R2.
-
Richard Smith authored
dependent declaration.
-
Fangrui Song authored
-
Johannes Doerfert authored
The `assumes` directive is an OpenMP 5.1 feature that allows the user to provide assumptions to the optimizer. Assumptions can refer to directives (`absent` and `contains` clauses), expressions (`holds` clause), or generic properties (`no_openmp_routines`, `ext_ABCD`, ...). The `assumes` spelling is used for assumptions in the global scope while `assume` is used for executable contexts with an associated structured block. This patch only implements the global spellings. While clauses with arguments are "accepted" by the parser, they will simply be ignored for now. The implementation lowers the assumptions directly to the `AssumptionAttr`. Reviewed By: ABataev Differential Revision: https://reviews.llvm.org/D91980
-