| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
llvm-svn: 284427
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
raw_ostream has not afforded a lot of flexibility in terms of
how to format numbers when outputting. Wrap this all up into
a set of low level helper functions that can be used to output
numbers with arbitrary precision, alignment, format, etc and
then update raw_ostream to use these functions.
This will be useful for upcoming improvements to llvm's string
formatting libraries, but are still useful independently.
Differential Revision: https://reviews.llvm.org/D25497
llvm-svn: 284425
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The scalar version of this pattern was noted in:
https://reviews.llvm.org/D25485
and fixed with:
https://reviews.llvm.org/rL284395
More refactoring of the constant/splat helpers is needed and will happen in follow-up patches.
Differential Revision: https://reviews.llvm.org/D25685
llvm-svn: 284424
|
|
|
|
|
|
|
|
|
|
|
|
| |
As noted in:
https://reviews.llvm.org/D25685
This is the next-to-smallest step needed to enable the ComputeNumSignBits fix in that patch.
In a minor attempt to keep some structure, we're pulling the FP helper over along with its
integer sibling, but clearly we can and should do more refactoring of the similar helper
functions in DAGCombiner and SelectionDAG to simplify and not duplicate functionality.
llvm-svn: 284421
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If -coverage is passed, but -g is not, clang populates the PassManager
pipeline with StripSymbols(debugOnly = true).
The stripSymbol pass therefore scans the list of named metadata,
drops !llvm.dbg.cu, but leaves !llvm.gcov and !0 (the compileUnit MD)
around. The verifier runs, and finds out that there's a CU not listed
in !llvm.dbg.cu (as it was previously dropped) -> crash.
When we strip debug info, so, check if there's coverage data,
and strip it as well, in order to avoid pending metadata left around.
Differential Revision: https://reviews.llvm.org/D25689
llvm-svn: 284418
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Debug info should *not* affect code generation. This patch properly handles debug info to make sure the generated code are the same with or without debug info.
Reviewers: davidxl, mzolotukhin, jmolloy
Subscribers: aprantl, llvm-commits
Differential Revision: https://reviews.llvm.org/D25286
llvm-svn: 284415
|
|
|
|
| |
llvm-svn: 284414
|
|
|
|
| |
llvm-svn: 284412
|
|
|
|
| |
llvm-svn: 284411
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This adds the necessary logic to support relocations to thumb functions in the COFF dynamic linker.
The jumps to function addresses are mostly blx, which requires the ISA selection bit when jumping to a thumb function.
Note: I'm determining if the relocation requires the ISA bit when creating the relocation entries and not when resolving the relocation. I have to do that because I need the ObjectFile and the actual Symbol, which are available only when creating the entries. It would require a gross refactor if I do it otherwise, but I'm okay with doing it if you think it's better.
Reviewers: peter.smith, compnerd
Subscribers: rengolin, sas
Differential Revision: https://reviews.llvm.org/D25151
llvm-svn: 284410
|
|
|
|
|
|
|
| |
This is a small step in making this interface compatible with an
bitcode symbol table.
llvm-svn: 284408
|
|
|
|
| |
llvm-svn: 284406
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: arsenm
Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, tony-tye, llvm-commits
Differential Revision: https://reviews.llvm.org/D25203
llvm-svn: 284398
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
If we are loading an i16 value from a 32-bit memory location, then
we need to be able to truncate the loaded value to i16.
Reviewers: arsenm
Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, tony-tye, llvm-commits
Differential Revision: https://reviews.llvm.org/D25198
llvm-svn: 284397
|
|
|
|
|
|
|
|
|
| |
This came up as part of:
https://reviews.llvm.org/D25485
Note that the vector case is missed because ComputeNumSignBits() is deficient for vectors.
llvm-svn: 284395
|
|
|
|
| |
llvm-svn: 284394
|
|
|
|
| |
llvm-svn: 284393
|
|
|
|
|
|
|
|
|
|
| |
Based on post-commit review for D25585/r284180, rename
hardware_physical_concurrency to heavyweight_hardware_concurrency,
to better reflect what type of tasks it should be used for and
to enable other systems to map this to something other than the
number of physical cores.
llvm-svn: 284390
|
|
|
|
|
|
|
|
|
| |
Patch checks that section pointer is aligned properly.
This should be done before getStringTable() call.
Differential revision: https://reviews.llvm.org/D25462
llvm-svn: 284387
|
|
|
|
|
|
|
| |
Windows doesn't have roots, so I think this test doesn't make sense
there.
llvm-svn: 284386
|
|
|
|
|
|
|
| |
/../foo is still a proper path after removing the dotdot. This should
now finally match https://9p.io/sys/doc/lexnames.html [Cleaning names].
llvm-svn: 284384
|
|
|
|
|
|
|
|
| |
SelectionDAG::getConstantPool will automatically determine an appropriate alignment if one is not specified. It does this by querying the type's preferred alignment. This can end up creating quite a lot of padding when the preferred alignment for vectors is 128.
In optimize-for-size mode, it makes sense to instead query the ABI type alignment which is often smaller and causes less padding.
llvm-svn: 284381
|
|
|
|
| |
llvm-svn: 284380
|
|
|
|
|
|
|
|
|
|
| |
Not all ConstantExprs can be represented by a global variable, for example most
pointer arithmetic other than addition of a constant, so we can't convert these
values from switch statements to lookup tables.
Differential Revision: https://reviews.llvm.org/D25550
llvm-svn: 284379
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: The delinearization algorithm did not consider terms which had an extension without a multiply factor, i.e. a identify factor. We lose cases where size is char type where there will no multiply factor.
Reviewers: sanjoy, grosser
Subscribers: mzolotukhin, Eugene.Zelenko, llvm-commits, mssimpso, sanjoy, grosser
Differential Revision: https://reviews.llvm.org/D16492
llvm-svn: 284378
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
retain the original debug location.
CodeGenPrepare knows how to move a zext of a load into the same basic block
where the load lives. The goal is to help ISel match a zero-extending load
instead of two separated instructions.
CGP attempts to move a zext computation even if it lives in a basic block that
does not post-dominate the load's basic block. That means, the hoisted zext may
be speculated. Preserving the zext location would hurt the debugging experience
and the quality of sample pgo.
With this patch, when moving a zext near to its associated load, CGP no longer
propagates the zext's debug location. Instead, CGP conservatively reuses the
same debug location for the load and the zext.
An alternative approach would be to assign an artificial line-0 location to the
zext. However we don't want to over-use the 'line-0' for this particular case
because it would have a size cost in the line-table section for no additional
benefit.
Differential Revision: https://reviews.llvm.org/D25611
llvm-svn: 284377
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With fix: hex edited the precompiled inputs from another testcases to pass new checks.
Original commit message:
[Object/ELF] - Check that e_shnum is null when e_shoff is.
Spec says (http://www.sco.com/developers/gabi/1998-04-29/ch4.eheader.html) :
e_shnum
This member holds the number of entries in the section header table. Thus the product of e_shentsize and e_shnum gives the section header table's size in bytes. If a file has no section header table, e_shnum holds the value zero.
Revealed using "id_000037,sig_11,src_000015,op_havoc,rep_8" from PR30540
That was the reason of crash in lld on incorrect input file.
Binary reduced using afl-min.
Differential revision: https://reviews.llvm.org/D25090
llvm-svn: 284374
|
|
|
|
|
|
|
| |
It broke build bot:
http://lab.llvm.org:8011/builders/clang-with-lto-ubuntu/builds/908/steps/test-stage1-compiler/logs/stdio
llvm-svn: 284373
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Spec says (http://www.sco.com/developers/gabi/1998-04-29/ch4.eheader.html) :
e_shnum
This member holds the number of entries in the section header table. Thus the product of e_shentsize and e_shnum gives the section header table's size in bytes. If a file has no section header table, e_shnum holds the value zero.
Revealed using "id_000037,sig_11,src_000015,op_havoc,rep_8" from PR30540
That was the reason of crash in lld on incorrect input file.
Binary reduced using afl-min.
Differential revision: https://reviews.llvm.org/D25090
llvm-svn: 284371
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If object has wrong (large) string table index and
also incorrect large value for amount of sections in total,
then section index passes the check:
if (Index >= getNumSections())
return object_error::invalid_section_index;
But result pointer then is far after end of file data, what
result in a crash.
Differential revision: https://reviews.llvm.org/D25081
llvm-svn: 284369
|
|
|
|
|
|
|
|
| |
Uses of this have all been updated to use LLVM_NODISCARD, which
matches the C++17 [[nodiscard]] semantics rather than those of GCC's
__attribute__((warn_unused_result)).
llvm-svn: 284367
|
|
|
|
|
|
| |
operands. Update the checks themselves to be >= to the same number instead of > one less than the required number.
llvm-svn: 284365
|
|
|
|
|
|
|
|
| |
Instead of annotating (most of) the StringRef API, we can just
annotate the type directly. This is less code and it will warn in more
cases.
llvm-svn: 284364
|
|
|
|
|
|
| |
existing support for vpermt2var.
llvm-svn: 284357
|
|
|
|
|
|
| |
Combining will be added in a future commit.
llvm-svn: 284356
|
|
|
|
|
|
|
|
| |
an insert_subvector into a subvector broadcast.
Differential Revision: https://reviews.llvm.org/D25650
llvm-svn: 284353
|
|
|
|
|
|
|
|
| |
Ideally these would actually check that the results are reasonable,
but given that we're looping over so many different kinds of path that
isn't really practical.
llvm-svn: 284350
|
|
|
|
|
|
|
| |
Simplify this a little bit since the result is never used. It can be
added back easily enough if that changes.
llvm-svn: 284348
|
|
|
|
|
|
|
| |
Update a function annotated with LLVM_ATTRIBUTE_UNUSED_RESULT to use
LLVM_NODISCARD instead.
llvm-svn: 284346
|
|
|
|
|
|
|
| |
Update functions annotated with LLVM_ATTRIBUTE_UNUSED_RESULT to use
LLVM_NODISCARD instead.
llvm-svn: 284345
|
|
|
|
|
|
|
| |
Update functions annotated with LLVM_ATTRIBUTE_UNUSED_RESULT to use
LLVM_NODISCARD instead.
llvm-svn: 284344
|
|
|
|
|
|
|
| |
Update functions annotated with LLVM_ATTRIBUTE_UNUSED_RESULT to use
LLVM_NODISCARD instead.
llvm-svn: 284343
|
|
|
|
|
|
|
| |
Instead of annotating (most of) the ArrayRef API, we can just annotate
the type directly. This is less code and it will warn in more cases.
llvm-svn: 284342
|
|
|
|
|
|
| |
fix TBAA violation in profiling of pointers.
llvm-svn: 284336
|
|
|
|
|
|
| |
other vpermi2var intrinsics.
llvm-svn: 284329
|
|
|
|
| |
llvm-svn: 284328
|
|
|
|
|
|
| |
HasVLX predicate. Similar for floating point.
llvm-svn: 284327
|
|
|
|
| |
llvm-svn: 284320
|
|
|
|
|
|
|
|
| |
SDNode to MachineMemOperand, and remove redundant getAtomic* member functions from SelectionDAG.
Differential Revision: https://reviews.llvm.org/D24577
llvm-svn: 284312
|
|
|
|
|
|
|
|
|
|
|
| |
In theory this could be generalized to move anything where
we prove the operands are available, but that would require
rewriting PRE. As NewGVN will hopefully come soon, and we're
trying to rewrite PRE in terms of NewGVN+MemorySSA, it's probably
not worth spending too much time on it. Fix provided by
Daniel Berlin!
llvm-svn: 284311
|