1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00
llvm-mirror/lib
Ayke van Laethem 2d43b2fbd5 [AVR] Remove faulty stack pushing behavior
An instruction like this will need to allocate some stack space for the
last parameter:

  %x = call addrspace(1) i16 @bar(i64 undef, i64 undef, i16 undef, i16 0)

This worked fine when passing an actual value (in this case 0). However,
when passing undef, no value was pushed to the stack and therefore no
push instructions were created. This caused an unbalanced stack leading
to interesting results.

This commit fixes that by replacing the push logic with a regular stack
adjustment and stack-relative load/stores. This is less efficient but at
least it correctly compiles the code.

I can think of a few improvements in the future:

  * The stack should have been adjusted in the function prologue when
    there are no allocas in the function.
  * Many (if not most) stack adjustments can be replaced by
    pushing/popping the values directly. Exactly like the previous code
    attempted but didn't do correctly.
  * Small stack adjustments can be done more efficiently with a few
    push/pop instructions (pushing/popping bogus values), both for code
    size and for speed.

All in all, as long as there are no allocas in the function I think that
it is almost always more efficient to emit regular push/pop
instructions. This is however left for future optimizations.

Differential Revision: https://reviews.llvm.org/D78581
2020-06-16 13:53:32 +02:00
..
Analysis [CostModel] Unify getCFInstrCost 2020-06-16 08:40:54 +01:00
AsmParser [LLParser] Delete temp CallInst when error occurs 2020-06-16 11:41:25 +08:00
BinaryFormat [WebAssembly] Adding 64-bit version of R_WASM_MEMORY_ADDR_* relocs 2020-06-15 10:07:42 -07:00
Bitcode [strictfp] Replace dangling strictfp attrs with nobuiltin 2020-06-15 10:05:35 -04:00
Bitstream
CodeGen [GlobalISel] Look through extends etc in CombinerHelper::matchConstantOp 2020-06-15 16:34:25 -07:00
DebugInfo [NativeSession] Implement findLineNumbersByAddress in NativeSession, 2020-06-15 17:05:39 -07:00
Demangle
DWARFLinker
ExecutionEngine [RuntimeDyld] Add dependence on Core. 2020-06-15 11:14:27 -07:00
Extensions
Frontend [OpenMP] Replace Clang's OpenMP RTL Definitions with OMPKinds.def 2020-06-01 16:23:10 -04:00
Fuzzer
FuzzMutate [SVE] Eliminate calls to default-false VectorType::get() from FuzzMutate 2020-06-09 13:57:36 -07:00
IR [AssumeBundles] add cannonicalisation to the assume builder 2020-06-16 13:12:35 +02:00
IRReader
LineEditor
Linker [SVE] Eliminate calls to default-false VectorType::get() from Linker 2020-05-29 17:43:15 -07:00
LTO [StackSafety] Run ThinLTO 2020-06-12 18:11:29 -07:00
MC [MC] Generate .debug_frame in the 64-bit DWARF format [7/7] 2020-06-16 15:50:14 +07:00
MCA
Object [WebAssembly] Adding 64-bit version of R_WASM_MEMORY_ADDR_* relocs 2020-06-15 10:07:42 -07:00
ObjectYAML [ObjectYAML][DWARF] Implement the .debug_addr section. 2020-06-16 10:53:10 +08:00
Option
Passes [llvm][NFC] Move content of ML subdirectory into Analysis 2020-06-15 14:35:33 -07:00
ProfileData [gcov] Improve tests and lower the minimum supported version to gcov 3.4 2020-06-06 23:11:32 -07:00
Remarks YAMLRemarkParser.cpp - remove duplicate RemarkParser.h include. NFC. 2020-06-08 13:59:05 +01:00
Support [AMDGPU] Add gfx1030 target 2020-06-15 16:18:05 -07:00
TableGen [TableGen] Make behavior of getValueAsListOfStrings consistent with getValueAsString 2020-06-12 19:16:48 +01:00
Target [AVR] Remove faulty stack pushing behavior 2020-06-16 13:53:32 +02:00
Testing
TextAPI [llvm][llvm-nm] add TextAPI/MachO support 2020-06-11 18:54:16 -07:00
ToolDrivers
Transforms [AssumeBundles] add cannonicalisation to the assume builder 2020-06-16 13:12:35 +02:00
WindowsManifest
XRay [xray] Add llvm-xray extract support for 32 bit ARM 2020-05-28 18:41:11 -04:00
CMakeLists.txt
LLVMBuild.txt