Commit Graph

25193 Commits

Author SHA1 Message Date
Artyom Skrobov
190815e2ea Adding support for TargetLoweringBase::LibCall
Summary:
TargetLoweringBase::Expand is defined as "Try to expand this to other ops,
otherwise use a libcall." For ISD::UDIV and ISD::SDIV, the choice between
the two possibilities was defined in a rather convoluted way:

- if DIVREM is legal, expand to DIVREM
- if DIVREM has a custom lowering, expand to DIVREM
- if DIVREM libcall is defined and a remainder from the same division is
  computed elsewhere, expand to a DIVREM libcall
- else, expand to a DIV libcall

This had the undesirable effect that if both DIV and DIVREM are implemented
as libcalls, then ISD::UDIV and ISD::SDIV are expanded to the heavier DIVREM
libcall, even when the remainder isn't used.

The new code adds a new LegalizeAction, TargetLoweringBase::LibCall, so that
backends can directly control whether they prefer an expansion or a conversion
to a libcall. This makes the generic lowering code even more generic,
allowing its reuse in a wider range of target-specific configurations.

The useful effect is that ARM backend will now generate a call
to __aeabi_{i,u}div rather than __aeabi_{i,u}divmod in cases where
it doesn't need the remainder. There's no functional change outside
the ARM backend.

Reviewers: t.p.northover, rengolin

Subscribers: t.p.northover, llvm-commits, aemerson

Differential Revision: http://reviews.llvm.org/D13862

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250826 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-20 13:14:52 +00:00
Igor Breger
7bbbc5ccde AVX512: Implemented encoding and intrinsics for VPBROADCASTB/W/D/Q instructions.
Differential Revision: http://reviews.llvm.org/D13884

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250819 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-20 11:56:42 +00:00
Andrea Di Biagio
eb09365c84 [x86] Fix AVX maskload/store intrinsic prototypes.
The mask value type for maskload/maskstore GCC builtins is never a vector of
packed floats/doubles.

This patch fixes the following issues:
1. The mask argument for builtin_ia32_maskloadpd and builtin_ia32_maskstorepd
   should be of type llvm_v2i64_ty and not llvm_v2f64_ty.
2. The mask argument for builtin_ia32_maskloadpd256 and
   builtin_ia32_maskstorepd256 should be of type llvm_v4i64_ty and not
   llvm_v4f64_ty.
3. The mask argument for builtin_ia32_maskloadps and builtin_ia32_maskstoreps
   should be of type llvm_v4i32_ty and not llvm_v4f32_ty.
4. The mask argument for builtin_ia32_maskloadps256 and
   builtin_ia32_maskstoreps256 should be of type llvm_v8i32_ty and not
   llvm_v8f32_ty.

Differential Revision: http://reviews.llvm.org/D13776


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250817 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-20 11:20:13 +00:00
Lang Hames
7233876104 [Orc] Make CompileOnDemandLayer::findSymbol call BaseLayer::findSymbol if no
symbol definition is found in the logical dylibs.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250796 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-20 04:35:02 +00:00
Lang Hames
354229b217 [Orc] Fix MSVC bugs introduced in r250749.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250758 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-19 23:23:17 +00:00
Lang Hames
e61c7b5220 [Orc] Use '= default' for move constructor/assignment as per dblaikie's review.
Thanks Dave!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250749 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-19 22:49:18 +00:00
David Blaikie
36d045a51f Fix -Wdeprecated regarding ORC copying ValueMaterializers
As usual, this is a polymorphic hierarchy without polymorphic ownership,
so simply make the dtor protected non-virtual, protected default copy
ctor/assign, and make derived classes final. The derived classes will
pick up correct default public copy ops (and dtor) implicitly.

(wish I could add -Wdeprecated to the build, but last time I tried it
triggered on some system headers I still need to look into/figure out)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250747 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-19 22:15:55 +00:00
Duncan P. N. Exon Smith
f792618d1c Vectorize: Remove implicit ilist iterator conversions, NFC
Besides the usual, I finally added an overload to
`BasicBlock::splitBasicBlock()` that accepts an `Instruction*` instead
of `BasicBlock::iterator`.  Someone can go back and remove this overload
later (after updating the callers I'm going to skip going forward), but
the most common call seems to be
`BB->splitBasicBlock(BB->getTerminator(), ...)` and I'm not sure it's
better to add `->getIterator()` to every one than have the overload.
It's pretty hard to get the usage wrong.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250745 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-19 22:06:09 +00:00
Teresa Johnson
ca21c56a5f Pass FunctionInfoIndex by reference to WriteFunctionSummaryToFile (NFC)
Implemented suggestion by dblakie in review for r250704.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250723 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-19 19:06:06 +00:00
Lang Hames
4438c623f7 [Orc] Add explicit move constructor and assignment operator to make MSVC happy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250722 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-19 18:59:22 +00:00
Lang Hames
a4b30b513d [Orc] Lambda needs to capture 'this'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250716 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-19 17:53:43 +00:00
Lang Hames
e6cb054d6a [Orc] Remove extraneous semicolon that found its way into r250712.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250715 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-19 17:49:37 +00:00
Matthias Braun
dbab1c23c7 Revert "RegisterPressure: allocatable physreg uses are always kills"
This reverts commit r250596.

Reverted for now as the commit triggers assert in the AMDGPU target
pending investigation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250713 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-19 17:44:22 +00:00
Lang Hames
65040b23fb [Orc] Add support for emitting indirect stubs directly into the JIT target's
memory, rather than representing the stubs in IR. Update the CompileOnDemand
layer to use this functionality.

Directly emitting stubs is much cheaper than building them in IR and codegen'ing
them (see below). It also plays well with remote JITing - stubs can be emitted
directly in the target process, rather than having to send them over the wire.

The downsides are:

(1) Care must be taken when resolving symbols, as stub symbols are held in a
    separate symbol table. This is only a problem for layer writers and other
    people using this API directly. The CompileOnDemand layer hides this detail.

(2) Aliases of function stubs can't be symbolic any more (since there's no
    symbol definition in IR), but must be converted into a constant pointer
    expression. This means that modules containing aliases of stubs cannot be
    cached. In practice this is unlikely to be a problem: There's no benefit to
    caching such a module anyway.

On balance I think the extra performance is more than worth the trade-offs: In a
simple stress test with 10000 dummy functions requiring stubs and a single
executed "hello world" main function, directly emitting stubs reduced user time
for JITing / executing by over 90% (1.5s for IR stubs vs 0.1s for direct
emission).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250712 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-19 17:43:51 +00:00
Elena Demikhovsky
da40167c02 Removed parameter "Consecutive" from isLegalMaskedLoad() / isLegalMaskedStore().
Originally I planned to use the same interface for masked gather/scatter and set isConsecutive to "false" in this case.

Now I'm implementing masked gather/scatter and see that the interface is inconvenient. I want to add interfaces isLegalMaskedGather() / isLegalMaskedScatter() instead of using the "Consecutive" parameter in the existing interfaces.

Differential Revision: http://reviews.llvm.org/D13850



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250686 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-19 07:43:38 +00:00
Rafael Espindola
899fdb1533 Add hashing and DenseMapInfo for ArrayRef
Sometimes it is more natural to use a ArrayRef<uint8_t> than a StringRef to
represent a range of bytes that is not, semantically, a string.

This will be used in lld in a sec.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250658 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-18 14:04:56 +00:00
Asaf Badouh
c375284b82 [X86][AVX512DQ] add scalar fpclass
Differential Revision: http://reviews.llvm.org/D13769


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250650 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-18 11:04:38 +00:00
Xinliang David Li
09717fa07b Minor Instr PGO code restructuring
1. Key constant values (version, magic) and data structures related to raw and 
   indexed profile format are moved into one centralized file: InstrProf.h.
2. Utility function such as MD5Hash computation is also moved to the common 
   header to allow sharing with other components in the future.
3. A header data structure is introduced for Indexed format so that the reader
   and writer can always be in sync.
4. Added some comments to document different places where multiple definition
   of the data structure must be kept in sync (reader/writer, runtime, lowering 
   etc).  No functional change is intended.

Differential Revision:  http://reviews.llvm.org/D13758


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250638 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-18 01:02:29 +00:00
Craig Topper
6e17bb78ba Use binary search in isCPUStringValid since the array is sorted.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250613 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-17 16:37:09 +00:00
Matthias Braun
041a4592b9 RegisterPressure: Unify the sparse sets in LiveRegsSet; NFC
Also do some cleanups comment improvements.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250598 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-17 01:03:44 +00:00
Matthias Braun
4bcbcdbff2 RegisterPressure: allocatable physreg uses are always kills
This property was already used in the code path when no liveness
intervals are present. Unfortunately the code path that uses liveness
intervals tried to query a cached live interval for an allocatable
physreg, those are usually not computed so a conservative default was
used.

This doesn't affect any of the lit testcases. This is a foreclosure to
upcoming changes which should be NFC but without this patch this tidbit
wouldn't be NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250596 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-17 00:46:57 +00:00
Matthias Braun
424a6917aa RegisterPressure: Hide non-const iterators of PressureDiff
It is too easy to accidentally violate the ordering requirements when
modifying the PressureDiff entries through iterators.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250590 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-17 00:08:48 +00:00
Reid Kleckner
610dd981a3 [WinEH] Fix stack alignment in funclets and ParentFrameOffset calculation
Our previous value of "16 + 8 + MaxCallFrameSize" for ParentFrameOffset
is incorrect when CSRs are involved. We were supposed to have a test
case to catch this, but it wasn't very rigorous.

The main effect here is that calling _CxxThrowException inside a
catchpad doesn't immediately crash on MOVAPS when you have an odd number
of CSRs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250583 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-16 23:43:27 +00:00
Xinliang David Li
373c216e8e Instroduce a template file to define InstrPGO core data structures.
Changing PGO data format layout can be a pain. Many different places need
to be touched and kept in sync. Failing to do so usually results in errors
very time consuming to debug.

This file is intended to be the master file that defines the layout of the
core runtime data structures. Currently only two structure is covered: Per
function ProfData structure and the function record structure used in
coverage mapping.

No client code has been made yet, so this commit is NFC.




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250574 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-16 23:17:34 +00:00
Diego Novillo
9dc572f568 Sample profiles - Re-arrange binary format to emit head samples only on top functions.
The number of samples collected at the head of a function only make
sense for top-level functions (i.e., those actually called as opposed to
being inlined inside another).

Head samples essentially count the time spent inside the function's
prologue.  This clearly doesn't make sense for inlined functions, so we
were always emitting 0 in those.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250539 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-16 18:54:35 +00:00
Yaron Keren
0ee039816a Fix typo, NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250529 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-16 17:50:47 +00:00
Diego Novillo
1965754e59 Sample Profiling - Remove useless asserts. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250513 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-16 13:54:52 +00:00
Dylan McKay
350708a1fc Initial migration of AVR backend
This patch adds the underlying infrastructure for an AVR backend to be included into LLVM. It is the first of a series of patches aimed at moving the out-of-tree AVR backend into the tree.

It consists of adding a new`Triple` target 'avr'.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250492 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-16 03:10:30 +00:00
Lang Hames
b83a35aab6 Add emacs c++ mode hint.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250479 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-16 00:44:01 +00:00
Evgeniy Stepanov
844145720c Revert "[safestack] Fast access to the unsafe stack pointer on AArch64/Android."
Breaks the hexagon buildbot.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250461 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-15 21:26:49 +00:00
Evgeniy Stepanov
06f1d96236 [safestack] Fast access to the unsafe stack pointer on AArch64/Android.
Android libc provides a fixed TLS slot for the unsafe stack pointer,
and this change implements direct access to that slot on AArch64 via
__builtin_thread_pointer() + offset.

This change also moves more code into TargetLowering and its
target-specific subclasses to get rid of target-specific codegen
in SafeStackPass.

This change does not touch the ARM backend because ARM lowers
builting_thread_pointer as aeabi_read_tp, which is not available
on Android.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250456 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-15 20:50:16 +00:00
Justin Bogner
8b9371cdcf docs: Stop using DEBUG() without DEBUG_TYPE in the ProgrammersManual
The DEBUG() macro has required that a DEBUG_TYPE be set since r206822.
Update the programmers manual to reflect that, and also update the
wording to point out that DEBUG_TYPE should be defined after #includes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250436 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-15 18:17:44 +00:00
Benjamin Kramer
339fd2d81a [SelectionDAG] Remove dead code. NFC.
Carefully selected parts without deleting graph stuff and dumping methods.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250434 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-15 17:54:06 +00:00
Benjamin Kramer
41a0990716 [AsmPrinter] Prune dead code. NFC.
I left all (dead) print and dump methods in place.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250433 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-15 17:16:32 +00:00
Diego Novillo
634f5c1b9b Sample Profiles - Adjust integer types. Mostly NFC.
This adjusts all integers in the reader/writer to reflect the types
stored on profile files. They should all be unsigned 32-bit or 64-bit
values. Changed all associated internal types to be uint32_t or
uint64_t.

The only place that needed some adjustments is in the sample profile
transformation. Altough the weight read from the profile are 64-bit
values, the internal API for branch weights only accepts 32-bit values.
The pass now saturates weights that overflow uint32_t.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250427 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-15 16:36:21 +00:00
Manman Ren
0f34207b1d Recommit r250345, it was reverted in r250366 to investigate a bot failure.
Our internal bot is still red after r250366.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250415 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-15 14:59:40 +00:00
Benjamin Kramer
d2358dd86c [DebugInfo] Remove dead forwarding accessors. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250405 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-15 13:56:02 +00:00
Igor Breger
60148c48cb AVX512: Implemented encoding and intrinsics for vpternlogd/q.
Differential Revision: http://reviews.llvm.org/D13768

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250396 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-15 12:33:24 +00:00
Eric Christopher
6f565c0e97 Remove DIFile from createSubroutineType.
Patch by Amaury Sechet with a small modification by me.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250374 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-15 06:56:10 +00:00
Manman Ren
9b380854cd Temporarily revert r250345 to sort out bot failure.
With r250345 and r250343, we start to observe the following failure
when bootstrap clang with lto and pgo:
PHI node entries do not match predecessors!
  %.sroa.029.3.i = phi %"class.llvm::SDNode.13298"* [ null, %30953 ], [ null, %31017 ], [ null, %30998 ], [ null, %_ZN4llvm8dyn_castINS_14ConstantSDNodeENS_7SDValueEEENS_10cast_rettyIT_T0_E8ret_typeERS5_.exit.i.1804 ], [ null, %30975 ], [ null, %30991 ], [ null, %_ZNK4llvm3EVT13getScalarTypeEv.exit.i.1812 ], [ %..sroa.029.0.i, %_ZN4llvm11SmallVectorIiLj8EED1Ev.exit.i.1826 ], !dbg !451895
label %30998
label %_ZNK4llvm3EVTeqES0_.exit19.thread.i
LLVM ERROR: Broken function found, compilation aborted!

I will re-commit this if the bot does not recover.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250366 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-15 04:58:24 +00:00
David Majnemer
4e486b6a4d [llvm-pdbdump] Provide a mechanism to dump the raw contents of a PDB
A PDB can be thought of as a very simple file system.  It is
occasionally illuminating to see the contents of the underlying files.

Differential Revision: http://reviews.llvm.org/D13674

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250356 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-15 01:27:19 +00:00
Cong Hou
a99158bbd8 Update the branch weight metadata in JumpThreading pass.
Currently in JumpThreading pass, the branch weight metadata is not updated after CFG modification. Consider the jump threading on PredBB, BB, and SuccBB. After jump threading, the weight on BB->SuccBB should be adjusted as some of it is contributed by the edge PredBB->BB, which doesn't exist anymore. This patch tries to update the edge weight in metadata on BB->SuccBB by scaling it by 1 - Freq(PredBB->BB) / Freq(BB->SuccBB).

This is the third attempt to submit this patch, while the first two led to failures in some FDO tests. After investigation, it is the edge weight normalization that caused those failures. In this patch the edge weight normalization is fixed so that there is no zero weight in the output and the sum of all weights can fit in 32-bit integer. Several unit tests are added.

Differential revision: http://reviews.llvm.org/D10979



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250345 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-14 23:14:17 +00:00
Daniel Berlin
a0241a7b06 [IDFCalculator] Use DominatorTreeBase instead of DominatorTree
Summary:
IDFCalculator used a DominatorTree instance for its calculations. Since the PostDominatorTree struct is not a subclass of DominatorTree, it wasn't possible to use PDT in IDFCalculator to compute post-dominance frontiers.

This patch makes IDFCalculator work with a DominatorTreeBase<BasicBlock> instead, which enables PDTs to be utilized.

Patch by Victor Campos (vhscampos@gmail.com)

Reviewers: dberlin

Subscribers: dberlin, llvm-commits

Differential Revision: http://reviews.llvm.org/D13725

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250320 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-14 19:54:24 +00:00
Diego Novillo
b61e5a3617 Sample profiles - Add documentation for binary profile encoding. NFC.
This adds documentation for the binary profile encoding and moves the
documentation for the text encoding into the header file
SampleProfReader.h.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250309 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-14 18:36:30 +00:00
Igor Kudrin
4598154b64 [llvm-readobj/ELF] Print GNU Hash section
Add a new command line switch, -gnu-hash-table, to print the content of that section.

Differential Revision: http://reviews.llvm.org/D13696


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250291 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-14 12:11:50 +00:00
Manman Ren
df57a6779d Revert r250204 and r250240 due to bot failure. We failed to build PGO-ed clang.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250264 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-14 03:04:03 +00:00
Richard Smith
1184005c1e Rename one of our two llvm::GCOVOptions classes to llvm::GCOV::Options. We used
to get away with this because llvm/Support/GCOV.h was an implementation detail
of the llvm-gcov tool, but it's now being used by FDO.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250258 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-14 00:04:19 +00:00
Diego Novillo
396d8018b2 Sample profile reader - remove dead code. NFC.
This removes old remnants from the gcov reader. I missed these when I
re-wrote it recently.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250242 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-13 22:48:48 +00:00
Diego Novillo
db271655dd Sample profiles - Add a name table to the binary encoding.
Binary encoded profiles used to encode all function names inline at
every reference.  This is clearly suboptimal in terms of space.  This
patch fixes this by adding a name table to the header of the file.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250241 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-13 22:48:46 +00:00
Cong Hou
5fa57d9ce3 Update MachineBranchProbabilityInfo::normalizeEdgeWeights to make sure there is no zero weight in the output, and also add a missing test for JumpThreading.
The test is for the patch in http://reviews.llvm.org/D10979 but was missing when committing that patch.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250240 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-13 22:27:41 +00:00