Comments (1)
More background
The rematerializing code is built to cheaply reproduce a small number of values for a single instruction. Since almost all machine instructions only use a handful of values, reproducing this small set of values right before the instruction doesn't normally cause issues. The rematerialization code creates small live ranges containing the remat instruction and its use, and prevents if from being evicted or spilled again.
The stackmap intrinsic violates the assumption of a few small values and can have a large number of live values that are rematerialized just for inclusion in the stackmap. This depletes the pool of available registers, causing this error. Note that this issue isn't encountered for call instructions which take a large number of values -- they are custom lowered so that all argument registers are filled and any remaining arguments are spilled to the stack appropriately.
See [1] for more information.
Quick and dirty workaround
The root cause of this issue is a large number of live values across stackmaps. Optimizations exacerbate this problem (as they often trade time for space or increased code size); in particular, inlining seems to cause this in some instances. Compiling with -fno-inline
may work around the issue. If not, turning the optimization level to -O0
may also eliminate the issue.
[1] "LLVM Register Allocation" https://www.slideshare.net/chimerawang/llvm-register-allocation-59885569
from popcorn-compiler.
Related Issues (20)
- Segmentation fault during homogeneous execution on aarch64 HOT 2
- pyalign script bugs HOT 2
- Failed assertion in CodeGen/UnwindInfo.cpp HOT 2
- Soft floating-point emulation routines leaking into aarch64 HOT 9
- Unable to build bodytrack with clang HOT 1
- Unhandled level 2 translation fault HOT 1
- Segfault when compiling bzlib.c (bzip2 SPEC-2006) HOT 1
- number of records for stackmap ... doesn't match HOT 1
- Argv argument table corruption HOT 2
- Cannot Build libopenpop HOT 2
- libelf: different code paths on aarch64 compared to x86-64 HOT 1
- GCC constructor/destructor attributes do not execute on AArch64
- SIGRTMIN does not induce migration
- struct stat wrong value HOT 4
- Wrong value when passing "struct stat" as a parameter to a function
- Stack transform timing utility architecture mismatch HOT 2
- Changing musl Makefile to use -O0 explicitly causes arm64 STLXR -> LDAXR pair to fail on real machines
- ./install_compiler.py error on Ubuntu 20.04 HOT 2
- libevent configure failed
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from popcorn-compiler.