Summary:
Adds fastpath instrumentation for esan's working set tool. The
instrumentation for an intra-cache-line load or store consists of an
inlined write to shadow memory bits for the corresponding cache line.
Adds a basic test for this instrumentation.
Reviewers: aizatsky
Subscribers: vitalybuka, zhaoqin, kcc, eugenis, llvm-commits
Differential Revision: http://reviews.llvm.org/D20483
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270640 91177308-0d34-0410-b5e6-96231b3b80d8
This patch adds support for:
S_EXPORT
LF_BITFIELD
With this patch, I have run through a couple of gigabytes of PDB
files and cannot find a type or symbol that we do not understand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270637 91177308-0d34-0410-b5e6-96231b3b80d8
This adds support for parsing and dumping the following
symbol types:
S_LPROCREF
S_ENVBLOCK
S_COMPILE2
S_REGISTER
S_COFFGROUP
S_SECTION
S_THUNK32
S_TRAMPOLINE
As of this patch, the test PDB files no longer have any unknown
symbol types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270628 91177308-0d34-0410-b5e6-96231b3b80d8
When dumping huge PDB files, too many of the options were grouped
together so you would get neverending spew of output. This patch
introduces more granular display options so you can only dump the
fields you actually care about.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270607 91177308-0d34-0410-b5e6-96231b3b80d8
This makes use of the newly introduced `CVSymbolVisitor` to dump details
of each type of symbol record in the symbol streams. Future patches will
bring this visitor based dumping to the publics stream, as well as
creating a `SymbolDumpDelegate` to print more information about
relocations etc.
Differential Revision: http://reviews.llvm.org/D20545
Reviewed By: ruiu
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270585 91177308-0d34-0410-b5e6-96231b3b80d8
Summary:
This patch changes the ODR resolution and internalization to be based on
updates to the Index, which are consumed by the backend portion of the
transformations.
It will be followed by an NFC change to move these out of libLTO's
ThinLTOCodeGenerator so that it can be used by other linkers
(gold and lld) and by ThinLTO distributed backends.
The global summary-based portions use callbacks so that the client can
determine the prevailing copy and other information in a client-specific
way. Eventually, with the API being developed in D20268, these may be
modified to use information such as symbol resolutions, supplied by the
clients to the API.
Reviewers: joker-eph
Subscribers: joker.eph, pcc, llvm-commits
Differential Revision: http://reviews.llvm.org/D20290
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270584 91177308-0d34-0410-b5e6-96231b3b80d8
Now, after landing r270560, r270557, r270320 it is a proper time.
Original commit message:
[llvm-mc] - Teach llvm-mc to generate compressed debug sections in zlib style.
Before this patch llvm-mc generated zlib-gnu styled sections.
That means no SHF_COMPRESSED flag was set, magic 'zlib' signature
was used in combination with full size field. Sections were renamed to "*.z*".
This patch reimplements the compression style to zlib one as zlib-gnu looks
to be depricated everywhere.
Differential revision: http://reviews.llvm.org/D20331
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270569 91177308-0d34-0410-b5e6-96231b3b80d8
Fix was:
1) Had to regenerate dwarfdump-test-zlib.elf-x86-64, dwarfdump-test-zlib-gnu.elf-x86-64
(because llvm-symbolizer-zlib.test uses that inputs for its purposes and failed).
2) Updated llvm-symbolizer-zlib.test (updated used call function address to match new files +
added one more check for newly created dwarfdump-test-zlib-gnu.elf-x86-64 binary input).
3) Updated comment in dwarfdump-test-zlib.cc.
Original commit message:
[llvm-dwarfdump] - Teach dwarfdump to decompress debug sections in zlib style.
Before this llvm-dwarfdump only recognized zlib-gnu compression style of headers,
this patch adds support for zlib style.
It looks reasonable to support both styles for dumping,
even if we are not going to suport generating of deprecated gnu one.
Differential revision: http://reviews.llvm.org/D20470
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270557 91177308-0d34-0410-b5e6-96231b3b80d8
fix: forgot to commit the updated dwarfdump-test-zlib.elf-x86-64
Original commit message:
[llvm-dwarfdump] - Teach dwarfdump to decompress debug sections in zlib style.
Before this llvm-dwarfdump only recognized zlib-gnu compression style of headers,
this patch adds support for zlib style.
It looks reasonable to support both styles for dumping,
even if we are not going to suport generating of deprecated gnu one.
Differential revision: http://reviews.llvm.org/D20470
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270543 91177308-0d34-0410-b5e6-96231b3b80d8
Before this llvm-dwarfdump only recognized zlib-gnu compression style of headers,
this patch adds support for zlib style.
It looks reasonable to support both styles for dumping,
even if we are not going to suport generating of deprecated gnu one.
Differential revision: http://reviews.llvm.org/D20470
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270540 91177308-0d34-0410-b5e6-96231b3b80d8
Moved the ModuleLoader and supporting helper loadModuleFromBuffer out of
ThinLTOCodeGenerator and into new LTO.h/LTO.cpp files. This is in
preparation for a patch that will utilize these in the gold-plugin.
Note that there are some other pending patches (D20268 and D20290) that
also plan to refactor common interfaces and functionality into this same
pair of new files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270509 91177308-0d34-0410-b5e6-96231b3b80d8
to llvm-objdump. This section is created with -fembed-bitcode option.
This requires the use of libxar and the Cmake and lit support were crafted by
Chris Bieneman!
rdar://26202242
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270491 91177308-0d34-0410-b5e6-96231b3b80d8
This effectively revers commit r270389 and re-lands r270106, but it's
almost a rewrite.
The behavior change in r270106 was that we could no longer assume that
each LF_FUNC_ID record got its own type index. This patch adds a map
from DINode* to TypeIndex, so we can stop making that assumption.
This change also emits padding bytes between type records similar to the
way MSVC does. The size of the type record includes the padding bytes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270485 91177308-0d34-0410-b5e6-96231b3b80d8
This will pave the way to introduce a full fledged symbol visitor
similar to how we have a type visitor, thus allowing the same
dumping code to be used in llvm-readobj and llvm-pdbdump.
Differential Revision: http://reviews.llvm.org/D20384
Reviewed By: rnk
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270475 91177308-0d34-0410-b5e6-96231b3b80d8
In r268693, we started requiring that SelectionDAGISel::Select return
void, but provided a default implementation that did just that by
calling into the old interface. Now that all targets have been
updated, we'll just remove the default implementation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270454 91177308-0d34-0410-b5e6-96231b3b80d8
Summary: This needs to get in before anything is released concerning attribute. If the old name gets in the wild, then we are stuck with it forever. Putting it in its own diff should getting that part at least in fast.
Reviewers: Wallbraker, whitequark, joker.eph, echristo, rafael, jyknight
Subscribers: llvm-commits, joker.eph
Differential Revision: http://reviews.llvm.org/D20417
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270452 91177308-0d34-0410-b5e6-96231b3b80d8
Prior to this patch, we were using 1 for all the repairing costs.
Now, we use the information from the target to get this information.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270304 91177308-0d34-0410-b5e6-96231b3b80d8
We now use LiveRangeCalc::extendToUses() instead of a specially designed
algorithm in constructMainRangeFromSubranges():
- The original motivation for constructMainRangeFromSubranges() were
differences between the main liverange and subranges because of hidden
dead definitions. This case however cannot happen anymore with the
DetectDeadLaneMasks pass in place.
- It simplifies the code.
- This fixes a longstanding bug where we did not properly create new SSA
values on merging control flow (the MachineVerifier missed most of
these cases).
- Move constructMainRangeFromSubranges() to LiveIntervalAnalysis and
LiveRangeCalc to better match the implementation/available helper
functions.
This re-applies r269016. The fixes from r270290 and r270259 should avoid
the machine verifier problems this time.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270291 91177308-0d34-0410-b5e6-96231b3b80d8
Summary:
Uses ModulePass instead of FunctionPass for EfficiencySanitizerPass to
better support global variable creation for a forthcoming struct field
counter tool.
Patch by Qin Zhao.
Reviewers: aizatsky
Subscribers: llvm-commits, eugenis, vitalybuka, bruening, kcc
Differential Revision: http://reviews.llvm.org/D20458
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270263 91177308-0d34-0410-b5e6-96231b3b80d8
DBI stream contains a stream number of the symbol record stream.
Symbol record streams is an array of length-type-value members.
Each member represents one symbol.
Publics stream contains offsets to the symbol record stream.
This patch is to print out all symbols that are referenced by
the publics stream.
Note that even with this patch, llvm-pdbdump cannot dump all the
information in a publics stream since it contains more information
than symbol names. I'll improve it in followup patches.
Differential Revision: http://reviews.llvm.org/D20480
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270262 91177308-0d34-0410-b5e6-96231b3b80d8
Fix renameDisconnectedComponents() creating vreg uses that can be
reached from function begin withouthaving a definition (or explicit
live-in). Fix this by inserting IMPLICIT_DEF instruction before
control-flow joins as necessary.
Removes an assert from MachineScheduler because we may now get
additional IMPLICIT_DEF when preparing the scheduling policy.
This fixes the underlying problem of http://llvm.org/PR27705
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270259 91177308-0d34-0410-b5e6-96231b3b80d8
The Fast mode takes the first mapping, the greedy mode loops over all
the possible mapping for an instruction and choose the cheaper one.
Test case will come with target specific code, since we currently do not
have instructions that have several mappings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270249 91177308-0d34-0410-b5e6-96231b3b80d8
computeMapping.
Computing the cost of a mapping takes some time.
Since in Fast mode, the cost is irrelevant, just spare some cycles by not
computing it.
In Greedy mode, we need to choose the best cost, that means that when
the local cost gets more expensive than the best cost, we can stop
computing the repairing and cost for the current mapping.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270245 91177308-0d34-0410-b5e6-96231b3b80d8
more precise cost in Greedy mode.
In Fast mode the cost is irrelevant so do not bother requiring that
those passes get scheduled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270244 91177308-0d34-0410-b5e6-96231b3b80d8
This adds support for handling unknown load commands, and a bogus_load_command tests.
Unknown or unsupported load commands can be specified in YAML by their hex value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270239 91177308-0d34-0410-b5e6-96231b3b80d8
The previous choice of the insertion points for repairing was
straightfoward but may introduce some basic block or edge splitting. In
some situation this is something we can avoid.
For instance, when repairing a phi argument, instead of placing the
repairing on the related incoming edge, we may move it to the previous
block, before the terminators. This is only possible when the argument
is not defined by one of the terminator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270232 91177308-0d34-0410-b5e6-96231b3b80d8
We now handle them just like non hidden ones. This was already the case
on x86 (r207518) and arm (r207517).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270205 91177308-0d34-0410-b5e6-96231b3b80d8
If an inline function is observed but unused in a translation unit, dummy
coverage mapping data with zero hash is stored for this function.
If such a coverage mapping section came earlier than real one, the latter
was ignored. As a result, llvm-cov was unable to show coverage information
for those functions.
Differential Revision: http://reviews.llvm.org/D20286
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270194 91177308-0d34-0410-b5e6-96231b3b80d8
Move the ExceptionHandling enumeration into TargetOptions and introduce a field
to track the desired exception model. This will allow us to set the exception
model from the frontend (needed to optionally use SjLj EH on other targets where
zero-cost is available and preferred).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270178 91177308-0d34-0410-b5e6-96231b3b80d8
an instruction.
Use the previously introduced RepairingPlacement class to split the code
computing the repairing placement from the code doing the actual
placement. That way, we will be able to consider different placement and
then, only apply the best one.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270168 91177308-0d34-0410-b5e6-96231b3b80d8