| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When GlobalOpt has determined that a GlobalVariable only ever has two values,
it would convert the GlobalVariable to a boolean, and introduce SelectInsts
at every load, to choose between the two possible values. These SelectInsts
introduce overhead and other unpleasantness.
This patch makes GlobalOpt just add range metadata to loads from such
GlobalVariables instead. This enables the same main optimization (as seen in
test/Transforms/GlobalOpt/integer-bool.ll), without introducing selects.
The main downside is that it doesn't get the memory savings of shrinking such
GlobalVariables, but this is expected to be negligible.
llvm-svn: 204076
|
|
|
|
|
|
| |
the MachineRegisterInfo iterators are compatible with it.
llvm-svn: 204075
|
|
|
|
| |
llvm-svn: 204072
|
|
|
|
| |
llvm-svn: 204071
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
See r204027 for the precursor to this that applied to asm debug info.
This required some non-obvious API changes to handle the case of asm
output (we never go asm->asm so this didn't come up in r204027): the
modification of the file/directory name by MCDwarfLineTableHeader needed
to be reflected in the MCAsmStreamer caller so it could print the
appropriate .file directive, so those StringRef parameters are now
non-const ref (in/out) parameters rather than just const.
llvm-svn: 204069
|
|
|
|
| |
llvm-svn: 204063
|
|
|
|
|
|
|
|
| |
It is unclear how it would be possible to get M to be NULL in normal scenarios.
Change this to an assert rather than a runtime check as per dblakie's
suggestion.
llvm-svn: 204060
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This performs the equivalent of a .set directive in that it creates a symbol
which is an alias for another symbol or value which may possibly be yet
undefined. This directive also has the added property in that it marks the
aliased symbol as being a thumb function entry point, in the same way that the
.thumb_func directive does.
The current implementation fails one test due to an unrelated issue. Functions
within .thumb sections are not marked as thumb_func. The result is that
the aliasee function is not valued correctly.
llvm-svn: 204059
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rather than LegalizeAction::Expand, this needs LegalizeAction::Promote to get
promoted to fp_to_sint v8f32->v8i32. This is a legal operation on AVX.
For that to work properly, we also need to teach the legalizer about the
specific promotion required here. The default vector promotion uses
bitcasting to a vector type of the same total size. We want to promote the
vector element type, effectively widening the operation and then truncating
the result. This is analogous to the current logic of how int_to_fp is
promoted.
The change also factors out some code from the int_to_fp promotion code to
ValueType::widenIntegerVectorElementType. This is now shared between
int_to_fp and fp_to_int.
There is no longer need for the custom lowering of fp_to_sint f32->v8i16 in
X86. It can now go through the new target-independent fp_to_*int promotion
logic.
I also checked that no other target uses Promote for these ops yet, so there
shouldn't be any unexpected change in behavior.
Fixes <rdar://problem/16202247>
llvm-svn: 204058
|
|
|
|
|
|
|
|
| |
The type of the immediates should not matter as long as the encoding is
equivalent to the encoding of one of the legal inline constants.
Tested-by: Michel Dänzer <michel.daenzer@amd.com>
llvm-svn: 204056
|
|
|
|
|
|
|
|
|
|
|
|
| |
This instructions writes to an 32-bit SGPR. This change required adding
the 32-bit VCC_LO and VCC_HI registers, because the full VCC register
is 64 bits.
This fixes verifier errors on several of the indirect addressing piglit
tests.
Tested-by: Michel Dänzer <michel.daenzer@amd.com>
llvm-svn: 204055
|
|
|
|
|
|
|
| |
Added checks for number of operands and operand register classes.
Tested-by: Michel Dänzer <michel.daenzer@amd.com>
llvm-svn: 204054
|
|
|
|
|
|
|
|
|
| |
The "noduplicate" attribute of call instructions is sometimes queried directly
and sometimes through the cannotDuplicate() predicate. This patch streamlines
all queries to use the cannotDuplicate() predicate. It also adds this predicate
to InvokeInst, to mirror what CallInst has.
llvm-svn: 204049
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: rafael
Reviewed By: rafael
CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D3081
llvm-svn: 204031
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is really a consistency fix. Since given
a = b
we propagate the information, we should propagate it too given
a = b + (1 - 1)
Fixes pr19145.
llvm-svn: 204028
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The previous deduping strategy was woefully inadequate - it only
considered the most recent file used and avoided emitting a duplicate in
that case - never considering the a/b/a scenario.
It was also lacking when it came to directory paths as the previous
filename would never match the current if the filename had been split
into file and directory components.
This change builds caching functionality into the line table at the
lowest level in an optional form (a file number of 0 indicates that one
should be chosen and returned) and will eventually be reused by the
normal source level debugging DWARF emission.
llvm-svn: 204027
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Adds support for inserting vzerouppers before tail-calls.
This is enabled implicitly by having MachineInstr::copyImplicitOps preserve
regmask operands, which allows VZeroUpperInserter to see where tail-calls use
vector registers.
- Fixes a bug that caused the previous version of this optimization to miss some
vzeroupper insertion points in loops. (Loops-with-vector-code that followed
loops-without-vector-code were mistakenly overlooked by the previous version).
- New algorithm never revisits instructions.
Fixes <rdar://problem/16228798>
llvm-svn: 204021
|
|
|
|
|
|
|
| |
While technically correct, we generally disallow any instance of named
Twines due to their subtlety.
llvm-svn: 204016
|
|
|
|
| |
llvm-svn: 204013
|
|
|
|
| |
llvm-svn: 204011
|
|
|
|
|
|
|
| |
Also convert a horrible hash function to use our hashing infrastructure.
No functionality change.
llvm-svn: 204008
|
|
|
|
|
|
|
|
|
| |
Utilize the previous move of MVT to a separate header for all trivial
cases (that don't need any further restructuring).
Reviewed By: Tim Northover
llvm-svn: 204003
|
|
|
|
|
|
|
|
| |
Since our error_category is based on the std one, we should have the
same visibility for the constructor. This also allows us to avoid
using the _do_message implementation detail in our own categories.
llvm-svn: 203998
|
|
|
|
| |
llvm-svn: 203996
|
|
|
|
|
|
|
| |
Twine was too short.
FIXME: DiagnosticInfoSampleProfile should not hold Twine&.
llvm-svn: 203990
|
|
|
|
|
|
| |
Private pointers are now always 32-bits.
llvm-svn: 203989
|
|
|
|
|
|
|
| |
Use sign_extend_inreg and getZeroExtendInReg instead of
using the bit operations they expand into.
llvm-svn: 203988
|
|
|
|
| |
llvm-svn: 203983
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
based on the ODR.
This adds an OdrMemberMap to DwarfDebug which is used to unique C++
member function declarations based on the unique identifier of their
containing class and their mangled name.
We can't use the usual DIRef mechanism here because DIScopes are indexed
using their entire MDNode, including decl_file and decl_line, which need
not be unique (see testcase).
Prior to this change multiple redundant member function declarations would
end up in the same uniqued DW_TAG_class_type.
llvm-svn: 203982
|
|
|
|
| |
llvm-svn: 203980
|
|
|
|
|
|
|
|
|
|
|
| |
For better or worse, this is currently the normal error reporting path
when dealing with backend errors from inline assembly. It's not just
internal compiler issues that come through here, so we shouldn't be
creating a backtrace on this path.
rdar://16329947
llvm-svn: 203979
|
|
|
|
| |
llvm-svn: 203977
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
The sample profiler pass emits several error messages. Instead of
just aborting the compiler with report_fatal_error, we can emit
better messages using DiagnosticInfo.
This adds a new sub-class of DiagnosticInfo to handle the sample
profiler.
Reviewers: chandlerc, qcolombet
CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D3086
llvm-svn: 203976
|
|
|
|
|
|
| |
Fix up testcases and use of flag.
llvm-svn: 203973
|
|
|
|
|
|
|
|
| |
any lexical scopes then go ahead and turn on DW_AT_ranges for the
compile unit since we would be claiming to describe in the CU
a range for which we don't have information in the CU otherwise.
llvm-svn: 203969
|
|
|
|
|
|
|
| |
Rewrite a couple of testcases to cover areas that would be normally
by turning it on into testcases that will follow the logic.
llvm-svn: 203968
|
|
|
|
|
|
|
| |
The member variable is not initialized in the ctor so it's already
empty. No need to empty it again.
llvm-svn: 203963
|
|
|
|
|
|
|
|
|
| |
We were marking the symbol as absolute instead of computing b's offset + the
expression value.
This fixes pr19126.
llvm-svn: 203962
|
|
|
|
| |
llvm-svn: 203946
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change brings getCallPreservedMask()'s logic in line with
getCalleeSavedRegs().
While this changes the control flow slightly, the change is not
currently observable. is64Bit must be false to get to the accidental
fallthrough, but the case that we fall into (coldcc) does nothing unless
is64Bit is true.
llvm-svn: 203943
|
|
|
|
|
|
|
| |
Changing order of checks in getCallPreservedMask() to match
getCalleeSavedRegs() so that the logic is easier to compare.
llvm-svn: 203939
|
|
|
|
|
|
|
| |
The current logic assumes that MF is not 0. Assert that it isn't, and
remove the default of 0 from the header.
llvm-svn: 203934
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: rafael
Reviewed By: rafael
CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D3077
llvm-svn: 203927
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit r181723 introduced code to avoid placing initialized variables
needing relocations into the .rodata section, which avoid copy relocs
that do not work as expected on ppc64 function references.
The same treatment is also needed for *named* .rodata.XXX sections.
This patch changes PPC64LinuxTargetObjectFile::SelectSectionForGlobal
to modify "Kind" *before* calling the default SelectSectionForGlobal
routine, instead of first calling the default routine and then just
checking for the (main) .rodata section afterwards.
llvm-svn: 203921
|
|
|
|
|
|
|
| |
by ignoring globals from __TEXT,__cstring,cstring_literals during instrumenation.
Add a regression test.
llvm-svn: 203916
|
|
|
|
| |
llvm-svn: 203915
|
|
|
|
| |
llvm-svn: 203914
|
|
|
|
|
|
|
|
| |
This is an initial version of *Sanitizer instrumentation of assembly code.
Patch by Yuri Gorshenin.
llvm-svn: 203908
|
|
|
|
|
|
| |
and XXTyR.
llvm-svn: 203907
|
|
|
|
| |
llvm-svn: 203905
|