| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
| |
This fixes the avr-rust issue (#75) with floating-point comparisons generating broken code.
By default, LLVM assumes these comparisons return 32-bit values, but ours are 8-bit.
Patch By Thomas Backman.
llvm-svn: 314070
|
|
|
|
|
|
| |
This has since been removed.
llvm-svn: 313965
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Also enables '__do_clear_bss'.
These functions are automaticalled called by the CRT if they are
declared.
We need these to be called otherwise RAM will start completely
uninitialised, even though we need to copy RAM variables from progmem to
RAM.
llvm-svn: 312905
|
|
|
|
| |
llvm-svn: 311620
|
|
|
|
|
|
|
|
|
|
|
| |
The liveness-tracking code assumes that the registers that were saved
in the function's prolog are live outside of the function. Specifically,
that registers that were saved are also live-on-exit from the function.
This isn't always the case as illustrated by the LR register on ARM.
Differential Revision: https://reviews.llvm.org/D36160
llvm-svn: 310619
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The patch from r310028 fixed things to work with the new
`LLVMTargetMachine` constructor that came in on r309911.
However, the fix was partial since an object of type
`CodeModel::Model` must be passed to `LLVMTargetMachine`
(not one of `Optional<CodeModel::Model>`).
This patch fixes the problem in the same fashion that r309911
did for other machines: by checking if the passed optional
code model has a value and using `CodeModel::Small` if not.
llvm-svn: 310200
|
|
|
|
|
|
| |
The required parameters were changed in r309911.
llvm-svn: 310028
|
|
|
|
|
|
|
|
| |
I have a much better way of running integration tests now.
https://github.com/dylanmckay/avr-test-suite
llvm-svn: 308857
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch makes LSR generate better code for SystemZ in the cases of memory
intrinsics, Load->Store pairs or comparison of immediate with memory.
In order to achieve this, the following common code changes were made:
* New TTI hook: LSRWithInstrQueries(), which defaults to false. Controls if
LSR should do instruction-based addressing evaluations by calling
isLegalAddressingMode() with the Instruction pointers.
* In LoopStrengthReduce: handle address operands of memset, memmove and memcpy
as address uses, and call isFoldableMemAccessOffset() for any LSRUse::Address,
not just loads or stores.
SystemZ changes:
* isLSRCostLess() implemented with Insns first, and without ImmCost.
* New function supportedAddressingMode() that is a helper for TTI methods
looking at Instructions passed via pointers.
Review: Ulrich Weigand, Quentin Colombet
https://reviews.llvm.org/D35262
https://reviews.llvm.org/D35049
llvm-svn: 308729
|
|
|
|
| |
llvm-svn: 307891
|
|
|
|
|
|
| |
Should fix warnings in the build.
llvm-svn: 307890
|
|
|
|
|
|
| |
Patch by Carl Peto.
llvm-svn: 307888
|
|
|
|
| |
llvm-svn: 307622
|
|
|
|
|
|
| |
It will only ever contain one register.
llvm-svn: 307620
|
|
|
|
| |
llvm-svn: 307619
|
|
|
|
| |
llvm-svn: 307617
|
|
|
|
|
|
| |
This reverts commit 602ef067c1d58ecb425d061f35f2bc4c7e92f4f3.
llvm-svn: 307111
|
|
|
|
|
|
|
| |
We should rewrite this using the generic branch relaxation pass, but for
the moment having this pass is better than hitting an assertion error.
llvm-svn: 307109
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, if a basic block ended with a FRMIDX instruction, we would
end up doing something like this.
*std::next(MBB.end())
Which would hit an error:
"Assertion `!NodePtr->isKnownSentinel()' failed."
llvm-svn: 307057
|
|
|
|
| |
llvm-svn: 307056
|
|
|
|
| |
llvm-svn: 306923
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: rafael, dylanmckay, jroelofs, meadori
Reviewed By: rafael, meadori
Subscribers: meadori, llvm-commits
Differential Revision: https://reviews.llvm.org/D34551
llvm-svn: 306359
|
|
|
|
| |
llvm-svn: 305051
|
|
|
|
|
|
|
|
|
|
|
|
| |
This creates a new library called BinaryFormat that has all of
the headers from llvm/Support containing structure and layout
definitions for various types of binary formats like dwarf, coff,
elf, etc as well as the code for identifying a file from its
magic.
Differential Revision: https://reviews.llvm.org/D33843
llvm-svn: 304864
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I did this a long time ago with a janky python script, but now
clang-format has built-in support for this. I fed clang-format every
line with a #include and let it re-sort things according to the precise
LLVM rules for include ordering baked into clang-format these days.
I've reverted a number of files where the results of sorting includes
isn't healthy. Either places where we have legacy code relying on
particular include ordering (where possible, I'll fix these separately)
or where we have particular formatting around #include lines that
I didn't want to disturb in this patch.
This patch is *entirely* mechanical. If you get merge conflicts or
anything, just ignore the changes in this patch and run clang-format
over your #include lines in the files.
Sorry for any noise here, but it is important to keep these things
stable. I was seeing an increasing number of patches with irrelevant
re-ordering of #include lines because clang-format was used. This patch
at least isolates that churn, makes it easy to skip when resolving
conflicts, and gets us to a clean baseline (again).
llvm-svn: 304787
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds a callback to the LLVMTargetMachine that lets target indicate
that they do not pass the machine verifier checks in all cases yet.
This is intended to be a temporary measure while the targets are fixed
allowing us to enable the machine verifier by default with
EXPENSIVE_CHECKS enabled!
Differential Revision: https://reviews.llvm.org/D33696
llvm-svn: 304320
|
|
|
|
|
|
|
| |
When generating code for a shift loop, check the shift
amount against the literal value 0, not R0
llvm-svn: 304284
|
|
|
|
|
|
| |
(https://github.com/avr-rust/rust/issues/50)
llvm-svn: 304283
|
|
|
|
|
|
|
|
|
|
|
| |
TargetPassConfig is not useful for targets that do not use the CodeGen
library, so we may just as well store a pointer to an
LLVMTargetMachine instead of just to a TargetMachine.
While at it, also change the constructor to take a reference instead of a
pointer as the TM must not be nullptr.
llvm-svn: 304247
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: CPI does not read the status register, but only writes it.
Reviewers: dylanmckay
Reviewed By: dylanmckay
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D33223
llvm-svn: 304116
|
|
|
|
|
|
|
|
|
|
| |
Contributed by Dr. Gergő Érdi.
Fixes a bug.
Raised from (https://github.com/avr-rust/rust/issues/49).
llvm-svn: 302973
|
|
|
|
| |
llvm-svn: 302970
|
|
|
|
|
|
|
|
|
|
|
|
| |
LLVM_END_WITH_NULL
Reviewers: dylanmckay, jroelofs, RKSimon, serge-sans-paille
Reviewed By: serge-sans-paille
Differential Revision: https://reviews.llvm.org/D33119
llvm-svn: 302885
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Using arguments with attribute inalloca creates problems for verification
of machine representation. This attribute instructs the backend that the
argument is prepared in stack prior to CALLSEQ_START..CALLSEQ_END
sequence (see http://llvm.org/docs/InAlloca.htm for details). Frame size
stored in CALLSEQ_START in this case does not count the size of this
argument. However CALLSEQ_END still keeps total frame size, as caller can
be responsible for cleanup of entire frame. So CALLSEQ_START and
CALLSEQ_END keep different frame size and the difference is treated by
MachineVerifier as stack error. Currently there is no way to distinguish
this case from actual errors.
This patch adds additional argument to CALLSEQ_START and its
target-specific counterparts to keep size of stack that is set up prior to
the call frame sequence. This argument allows MachineVerifier to calculate
actual frame size associated with frame setup instruction and correctly
process the case of inalloca arguments.
The changes made by the patch are:
- Frame setup instructions get the second mandatory argument. It
affects all targets that use frame pseudo instructions and touched many
files although the changes are uniform.
- Access to frame properties are implemented using special instructions
rather than calls getOperand(N).getImm(). For X86 and ARM such
replacement was made previously.
- Changes that reflect appearance of additional argument of frame setup
instruction. These involve proper instruction initialization and
methods that access instruction arguments.
- MachineVerifier retrieves frame size using method, which reports sum of
frame parts initialized inside frame instruction pair and outside it.
The patch implements approach proposed by Quentin Colombet in
https://bugs.llvm.org/show_bug.cgi?id=27481#c1.
It fixes 9 tests failed with machine verifier enabled and listed
in PR27481.
Differential Revision: https://reviews.llvm.org/D32394
llvm-svn: 302527
|
|
|
|
| |
llvm-svn: 302017
|
|
|
|
|
|
| |
This reverts commit 358ad02d999e88853d2cfc954bd2f668308a51f7.
llvm-svn: 302014
|
|
|
|
|
|
|
| |
A recent commit I made made it so that we only did this for signal or
interrupt handlers. This broke normal functions.
llvm-svn: 301893
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Because it was a callee-saved register, we automatically generated code
to spill and unspill its original value so that it is restored after the
function returns.
The problem is that this code was being generated before the epilogue.
The epilogue itself uses the Y register, which could be prematurely
restored by the CSR restoration process.
This removes R29R28 from the CSR list and changes the prologue/epilogue
code to handle it explicitly.
llvm-svn: 301887
|
|
|
|
|
|
|
| |
This is a temporary measure while we figure out a way to get the frame
pointer working correctly.
llvm-svn: 301881
|
|
|
|
|
|
| |
This lets us do bit rotations of variable amount.
llvm-svn: 301794
|
|
|
|
|
|
|
| |
Before this, the LDS/STS instructions would have their opcodes
overwritten while linking.
llvm-svn: 301782
|
|
|
|
| |
llvm-svn: 301413
|
|
|
|
|
|
|
| |
It caused the register to later be dead, which would trigger a verifier
error.
llvm-svn: 301368
|
|
|
|
| |
llvm-svn: 301313
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D31937
llvm-svn: 301234
|
|
|
|
|
|
| |
I forgot to commit local changes before commit.
llvm-svn: 301232
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D31937
llvm-svn: 301231
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. RegisterClass::getSize() is split into two functions:
- TargetRegisterInfo::getRegSizeInBits(const TargetRegisterClass &RC) const;
- TargetRegisterInfo::getSpillSize(const TargetRegisterClass &RC) const;
2. RegisterClass::getAlignment() is replaced by:
- TargetRegisterInfo::getSpillAlignment(const TargetRegisterClass &RC) const;
This will allow making those values depend on subtarget features in the
future.
Differential Revision: https://reviews.llvm.org/D31783
llvm-svn: 301221
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: dylanmckay, rengolin, kzhuravl, jroelofs
Reviewed By: kzhuravl, jroelofs
Subscribers: kzhuravl, llvm-commits
Differential Revision: https://reviews.llvm.org/D32154
llvm-svn: 300641
|
|
|
|
|
|
| |
'PointerSize' was renamed to 'CodePointerSize'.
llvm-svn: 300629
|