SHF_GROUP bit doesn't make sense in executables or DSOs, so linkers are
expected to remove that bit from section flags. We did that when we create
output sections.
This patch is to do that earlier than before. Now the flag is dropped when
we instantiate input section objects.
This change improves ICF. Previously, two sections that differ only in
SHF_GROUP flag were not merged, because when the control reached ICF,
the flag was still there. Now the flag is dropped before reaching to ICF,
so the difference is ignored naturally.
This issue was found by pcc.
Differential Revision: https://reviews.llvm.org/D34074
llvm-svn: 305134
We're currently passing endian-ness around as a param (and not uniformly),
so this eliminates the need for that. I'd like to add a constant fold
call too, and that requires a DL.
llvm-svn: 305129
UBSan found an issue with a nullptr being assigned to a reference.
This was because a following function went back and checked the
identifier in the CPPOperatorName case. This patch corrects that
location with the original logic as well.
llvm-svn: 305128
Summary:
- Fix assertion failures on F16 to/from int types in FastISel by falling
back to regular ISel
- Add a testcase of various conversion cases with FastISel (-O0)
Reviewers: kristof.beyls, jmolloy, SjoerdMeijer
Reviewed By: SjoerdMeijer
Subscribers: SjoerdMeijer, llvm-commits, srhines, pirama, aemerson, rengolin, javed.absar, kristof.beyls
Differential Revision: https://reviews.llvm.org/D33734
llvm-svn: 305127
This adds a new flag -style which is passed to clang-apply-replacements and
defaults to file meaning it would pick up the closest .clang-format file in tree.
llvm-svn: 305125
This diff removes temporary file t2 in fixit.c and updates the test command accordingly.
NFC.
Test plan:
make check-all
Differential revision: https://reviews.llvm.org/D34066
llvm-svn: 305124
Currently, we load all template specialization if we have more than one module
attached and we touch anything around the template definition.
This patch registers the template specializations as lazily-loadable entities.
In some TUs it reduces the amount of deserializations by 1%.
llvm-svn: 305120
n the current local-submodule-visibility mode, as soon as we discover a virtual
destructor, we declare on demand a global delete operator. However, this causes
that this delete operator is owned by the submodule which contains said virtual
destructor. This means that other modules no longer can see the global delete
operator which is hidden inside another submodule and fail to compile.
This patch unhides those global allocation function once they're created to
prevent this issue.
Patch by Raphael Isemann (D33366)!
llvm-svn: 305118
If specified, when preprocessing, the contents of imported .pcm files will be
included in preprocessed output. The resulting preprocessed file can then be
compiled standalone without the module sources or .pcm files.
llvm-svn: 305116
Previously it was non-const reference named Result which would tend to make someone think that it was an outparam when really its an input.
llvm-svn: 305114
Currently there is a bug in SROA::presplitLoadsAndStores which causes assertion in
GEPOperator::accumulateConstantOffset.
Basically it does not consider the situation that the pointer operand of load or store
may be in a non-zero address space and its size may be different from the size of
a pointer in address space 0.
This patch fixes assertion when compiling Blender Cycles kernels for amdgpu backend.
Diffferential Revision: https://reviews.llvm.org/D33298
llvm-svn: 305107
This is to reflect the evolving nature of the tool as being
useful for more than just dumping PDBs, as it can do many other
things.
Differential Revision: https://reviews.llvm.org/D34062
llvm-svn: 305106
Summary:
This prevents the iterator overrides from being selected in
the case where non-iterator types are used as arguments, which
is of particular importance in cases where other overrides with
identical types exist.
Reviewers: dblaikie, bkramer, rafael
Subscribers: llvm-commits, efriedma
Differential Revision: https://reviews.llvm.org/D33919
llvm-svn: 305105
Summary:
isSafeToSpeculativelyExecute is the wrong predicate to use here.
All that checks for is whether it is safe to hoist a value due to
unaligned/un-dereferencable accesses. However, not only are we doing
sinking rather than hoisting, our concern is that the location
we're loading from may have been modified. Instead forbid sinking
any load across a critical edge.
Reviewers: majnemer
Subscribers: davide, llvm-commits
Differential Revision: https://reviews.llvm.org/D33179
llvm-svn: 305102
as part of a compilation.
This is intended for two purposes:
1) Writing self-contained test cases for modules: we can now write a single
source file test that builds some number of module files on the side and
imports them.
2) Debugging / test case reduction. A single-source testcase is much more
amenable to reduction, compared to a VFS tarball or .pcm files.
llvm-svn: 305101
Previously extractors tried to be stateless with any additional
context information needed in order to parse items being passed
in via the extraction method. This led to quite cumbersome
implementation challenges and awkwardness of use. This patch
brings back support for stateful extractors, making the
implementation and usage simpler.
llvm-svn: 305093
Summary: Add the WindowsResourceCOFFWriter class for producing the final COFF after all parsing is done.
Reviewers: hiraditya!, zturner, ruiu
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D34020
llvm-svn: 305092
This test was silently failing since a long time because it failed to include
stdlib.h (as it's running in a freestanding environment). However, because we
used just not clang_cc1 instead of the verify mode, this regression was never
noticed and the test was just always passing.
This adds -ffreestanding to the invocation, so that tmmintrin.h doesn't
indirectly include mm_malloc.h, which in turns includes the unavailable stdlib.h.
We also run now in the -verify mode to prevent that we silently regress again.
I've also updated the test to no longer check the return value of _mm_alignr_epi8
as this is also causing it to fail (and it's not really the job of this test to
test this).
Patch by Raphael Isemann (D34022)
llvm-svn: 305089
to support operator keywords used in Windows SDK, alter token type when
seen in system headers
Hello, I submitted D33505 to address this problem, but the
proposal was rejected as too big a hammer.
This change will allow clang to parse the WindowsSDK header <query.h>
which uses the operator name "or" as a field name. Treat cpp operator
keywords as ordinary identifiers inside the Microsoft headers, but
treat them as usual in the user's program.
Original Submitter: Melanie Blower (mibintc)
Differential Revision: https://reviews.llvm.org/D33782
llvm-svn: 305087
Summary:
Unless I'm mistaken, the special handling for EQ/NE should cover everything and there is no reason to fallthrough to the more complex code. For that matter I'm not sure there's any reason to special case EQ/NE other than avoiding creating temporary ConstantRanges.
This patch moves the complex code into an else so we only do it when we are handling a predicate other than EQ/NE.
Reviewers: anna, reames, resistor, Farhana
Reviewed By: anna
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D34000
llvm-svn: 305086