Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve handling of function inlining a bit more #32

Open
wants to merge 59 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
70e9814
Build and upload artifact on GitHub Actions
antoyo May 31, 2021
8ad5bc9
Allow creating an array type even when the struct fields weren't set yet
antoyo Mar 28, 2022
c8413ca
Fix infinite recursion in gt_ggc_mx_lang_tree_node
antoyo Mar 28, 2022
13e6eac
Add support for packed struct
antoyo Mar 29, 2022
e0d8a39
Add gcc_jit_type_is_const
antoyo Apr 30, 2022
b440824
Add convert vector
antoyo May 14, 2022
f1b57c7
Allow sending a const pointer as argument
antoyo May 24, 2022
0137524
Add gcc_jit_global_set_readonly
antoyo May 24, 2022
ab15c3b
Fix 'unrecognizable instruction' error for convert_vector (IFN_VEC_CO…
antoyo Jun 19, 2022
71c488c
Fix a RTL bug for libgccjit which fixes a 'unrecognizable insn' error…
antoyo Jun 10, 2022
96eed4f
WIP: Add support for function attributes
antoyo Jun 20, 2022
a39aa4a
Disable check for unknown sizes in gcc_jit_rvalue_dereference_field t…
antoyo Jul 10, 2022
24cafc4
WIP: Add support for variable attributes
antoyo Jul 24, 2022
38b8410
Support signed char flag
antoyo Oct 3, 2022
5522d75
Add missing builtins needed by optimizations
antoyo Jan 3, 2023
29bf2fc
Add support for try/catch
antoyo Oct 15, 2022
8281be4
TODO: add comment to fix is_int
antoyo Jan 23, 2023
561b4ca
Allow not terminating finally blocks
antoyo Feb 3, 2023
5d25bd6
libgccjit: Add support for machine-dependent builtins
antoyo Feb 11, 2023
c97bc65
Make new_array_type take unsigned long
antoyo Mar 4, 2023
3e63da6
Add support for the variable inline attributes
antoyo Jan 23, 2023
1986920
Fix bug related to the personality function
antoyo Apr 16, 2023
d3790a8
Fix compilation error when bfloat is unsupported
Heath123 Jun 27, 2023
cd0ce51
Merge pull request #17 from Heath123/fix-no-bfloat
antoyo Jun 28, 2023
6717824
fixup! WIP: Add support for function attributes
GuillaumeGomez Jun 30, 2023
ad06312
fixup! WIP: Add support for function attributes
GuillaumeGomez Jun 30, 2023
00eaaa7
Merge pull request #18 from GuillaumeGomez/cold-attr
antoyo Jul 3, 2023
7e02bf4
Add ability to get CPU features
antoyo Jun 26, 2023
70d876b
Merge pull request #19 from antoyo/feature/jit-cpu-features
antoyo Jul 5, 2023
809825d
fixup! WIP: Add support for function attributes
GuillaumeGomez Jul 6, 2023
b4e6fe3
Merge pull request #20 from GuillaumeGomez/support-returns-twice-attr
antoyo Jul 11, 2023
2cfd669
Change return value of `gcc_jit_target_info_cpu_supports` and of `gcc…
GuillaumeGomez Jul 13, 2023
6dae9ee
fixup! WIP: Add support for function attributes
GuillaumeGomez Jul 13, 2023
03a7071
Merge pull request #21 from GuillaumeGomez/pure-attr
antoyo Jul 17, 2023
63cce91
fixup! WIP: Add support for function attributes
GuillaumeGomez Jul 21, 2023
65eb3d5
fixup! WIP: Add support for function attributes
GuillaumeGomez Jul 21, 2023
7f2995c
Merge pull request #22 from GuillaumeGomez/const-attr
antoyo Jul 22, 2023
9d5b6b2
Fix GGC
antoyo May 25, 2023
d430b38
Merge pull request #23 from antoyo/fix/ggc-bug-for-lto
antoyo Jul 28, 2023
eba45e4
fixup! WIP: Add support for function attributes
antoyo Jul 27, 2023
a9f9a30
Merge pull request #24 from antoyo/feature/weak-alias-attributes
antoyo Jul 28, 2023
90db268
Change the type of targetjitm to gcc_targetjitm
row454 Jul 29, 2023
95a2c9c
Merge pull request #25 from row454/default-jit_fix
antoyo Jul 31, 2023
840bab3
[PATCH] Add support for `restrict` attribute on function parameters
GuillaumeGomez Aug 11, 2023
d931e8d
Merge pull request #26 from GuillaumeGomez/restrict
antoyo Aug 17, 2023
64199db
Upload LTO artifacts
antoyo Aug 18, 2023
a6b3e98
Add crt artifacts
antoyo Aug 19, 2023
16686cb
Add gcc binary artifact
antoyo Aug 21, 2023
94f1362
Do not build c++ frontend
antoyo Aug 24, 2023
c4d7ad5
fixup! [PATCH] Add support for `restrict` attribute on function param…
GuillaumeGomez Aug 29, 2023
9235afe
Merge pull request #27 from GuillaumeGomez/complete-gcc-patch
antoyo Aug 29, 2023
2c415c4
Add debug prints to debug issue
antoyo Sep 9, 2023
327499c
Fix CPU feature detection
antoyo Sep 13, 2023
84a3a6b
Merge pull request #29 from antoyo/fix/cpu-feature-detection
antoyo Sep 13, 2023
64dee48
Implement sizeof
antoyo Sep 20, 2023
a033810
Merge pull request #30 from antoyo/feature/sizeof
antoyo Sep 20, 2023
6f65575
Add `add_integer_array_attribute` function and add support for NonNul…
GuillaumeGomez Sep 4, 2023
42f9055
Merge pull request #28 from GuillaumeGomez/non-null
antoyo Oct 10, 2023
1ddee47
Improve handling of function inlining a bit more
GuillaumeGomez Oct 17, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: CI

on:
- push
- pull_request

jobs:
build:
runs-on: ubuntu-latest

strategy:
fail-fast: false

steps:
- uses: actions/checkout@v2

- name: Install mpfr
run: sudo apt-get install gcc-10 libmpfr-dev libmpc-dev

- name: Build libgccjit
run: |
cd ..
ls
mkdir build install
cd build
../gcc/configure --enable-host-shared --enable-languages=c,jit,lto --disable-bootstrap --disable-multilib --prefix=$(pwd)/../install/usr --libdir=$(pwd)/../install/usr/lib --libexecdir=$(pwd)/../install/usr/lib
make -j4
make install

- name: Build Debian package
run: |
cd ..
mkdir install/DEBIAN
cat > install/DEBIAN/control << EOF
Package: gcc-13
Version: 13
Architecture: amd64
Maintainer: Antoni Boucher <bouanto@zoho.com>
Description: gcc 13 for rustc_codegen_gcc CI
EOF
dpkg-deb --root-owner-group --build install
mv install.deb gcc-13.deb

- uses: actions/upload-artifact@v3
with:
name: gcc-13
path: /home/runner/work/gcc/gcc-13.deb
if-no-files-found: error

- uses: actions/upload-artifact@v2
with:
name: libgccjit.so
path: |
/home/runner/work/gcc/build/gcc/libgccjit.so
/home/runner/work/gcc/build/gcc/lto1
/home/runner/work/gcc/build/gcc/liblto_plugin.so
/home/runner/work/gcc/build/gcc/lto-wrapper
/home/runner/work/gcc/build/gcc/crtbeginS.o
/home/runner/work/gcc/build/gcc/crtendS.o
29 changes: 26 additions & 3 deletions gcc/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,8 @@ tm_p_file_list=@tm_p_file_list@
tm_p_include_list=@tm_p_include_list@
tm_d_file_list=@tm_d_file_list@
tm_d_include_list=@tm_d_include_list@
tm_jit_file_list=@tm_jit_file_list@
tm_jit_include_list=@tm_jit_include_list@
build_xm_file_list=@build_xm_file_list@
build_xm_include_list=@build_xm_include_list@
build_xm_defines=@build_xm_defines@
Expand Down Expand Up @@ -868,6 +870,7 @@ CONFIG_H = config.h $(host_xm_file_list)
TCONFIG_H = tconfig.h $(xm_file_list)
TM_P_H = tm_p.h $(tm_p_file_list)
TM_D_H = tm_d.h $(tm_d_file_list)
TM_JIT_H = tm_jit.h $(tm_jit_file_list)
GTM_H = tm.h $(tm_file_list) insn-constants.h
TM_H = $(GTM_H) insn-flags.h $(OPTIONS_H)

Expand Down Expand Up @@ -926,10 +929,12 @@ TARGET_DEF = target.def target-hooks-macros.h target-insns.def
C_TARGET_DEF = c-family/c-target.def target-hooks-macros.h
COMMON_TARGET_DEF = common/common-target.def target-hooks-macros.h
D_TARGET_DEF = d/d-target.def target-hooks-macros.h
JIT_TARGET_DEF = jit/jit-target.def target-hooks-macros.h
TARGET_H = $(TM_H) target.h $(TARGET_DEF) insn-modes.h insn-codes.h
C_TARGET_H = c-family/c-target.h $(C_TARGET_DEF)
COMMON_TARGET_H = common/common-target.h $(INPUT_H) $(COMMON_TARGET_DEF)
D_TARGET_H = d/d-target.h $(D_TARGET_DEF)
JIT_TARGET_H = jit/jit-target.h $(JIT_TARGET_DEF)
MACHMODE_H = machmode.h mode-classes.def
HOOKS_H = hooks.h
HOSTHOOKS_DEF_H = hosthooks-def.h $(HOOKS_H)
Expand Down Expand Up @@ -1230,6 +1235,9 @@ CXX_TARGET_OBJS=@cxx_target_objs@
# Target specific, D specific object file
D_TARGET_OBJS=@d_target_objs@

# Target specific, JIT specific object file
JIT_TARGET_OBJS=@jit_target_objs@

# Target specific, Fortran specific object file
FORTRAN_TARGET_OBJS=@fortran_target_objs@

Expand Down Expand Up @@ -1947,6 +1955,7 @@ tconfig.h: cs-tconfig.h ; @true
tm.h: cs-tm.h ; @true
tm_p.h: cs-tm_p.h ; @true
tm_d.h: cs-tm_d.h ; @true
tm_jit.h: cs-tm_jit.h ; @true

cs-config.h: Makefile
TARGET_CPU_DEFAULT="" \
Expand Down Expand Up @@ -1978,6 +1987,11 @@ cs-tm_d.h: Makefile
HEADERS="$(tm_d_include_list)" DEFINES="" \
$(SHELL) $(srcdir)/mkconfig.sh tm_d.h

cs-tm_jit.h: Makefile
TARGET_CPU_DEFAULT="" \
HEADERS="$(tm_jit_include_list)" DEFINES="" \
$(SHELL) $(srcdir)/mkconfig.sh tm_jit.h

# Don't automatically run autoconf, since configure.ac might be accidentally
# newer than configure. Also, this writes into the source directory which
# might be on a read-only file system. If configured for maintainer mode
Expand Down Expand Up @@ -2619,6 +2633,15 @@ s-d-target-hooks-def-h: build/genhooks$(build_exeext)
d/d-target-hooks-def.h
$(STAMP) s-d-target-hooks-def-h

jit/jit-target-hooks-def.h: s-jit-target-hooks-def-h; @true

s-jit-target-hooks-def-h: build/genhooks$(build_exeext)
$(RUN_GEN) build/genhooks$(build_exeext) "JIT Target Hook" \
> tmp-jit-target-hooks-def.h
$(SHELL) $(srcdir)/../move-if-change tmp-jit-target-hooks-def.h \
jit/jit-target-hooks-def.h
$(STAMP) s-jit-target-hooks-def-h

# check if someone mistakenly only changed tm.texi.
# We use a different pathname here to avoid a circular dependency.
s-tm-texi: $(srcdir)/doc/../doc/tm.texi
Expand Down Expand Up @@ -2794,7 +2817,7 @@ s-gtype: $(EXTRA_GTYPE_DEPS) build/gengtype$(build_exeext) \
-r gtype.state
$(STAMP) s-gtype

generated_files = config.h tm.h $(TM_P_H) $(TM_D_H) $(TM_H) multilib.h \
generated_files = config.h tm.h $(TM_P_H) $(TM_D_H) $(TM_JIT_H) $(TM_H) multilib.h \
$(simple_generated_h) specs.h \
tree-check.h genrtl.h insn-modes.h insn-modes-inline.h \
tm-preds.h tm-constrs.h \
Expand All @@ -2803,7 +2826,7 @@ generated_files = config.h tm.h $(TM_P_H) $(TM_D_H) $(TM_H) multilib.h \
common/common-target-hooks-def.h pass-instances.def \
gimple-match.cc generic-match.cc \
c-family/c-target-hooks-def.h d/d-target-hooks-def.h \
case-cfn-macros.h \
jit/jit-target-hooks-def.h case-cfn-macros.h \
cfn-operators.pd omp-device-properties.h

#
Expand Down Expand Up @@ -2937,7 +2960,7 @@ build/genrecog.o : genrecog.cc $(RTL_BASE_H) $(BCONFIG_H) $(SYSTEM_H) \
$(CORETYPES_H) $(GTM_H) errors.h $(READ_MD_H) $(GENSUPPORT_H) \
$(HASH_TABLE_H) inchash.h
build/genhooks.o : genhooks.cc $(TARGET_DEF) $(C_TARGET_DEF) \
$(COMMON_TARGET_DEF) $(D_TARGET_DEF) $(BCONFIG_H) $(SYSTEM_H) errors.h
$(COMMON_TARGET_DEF) $(D_TARGET_DEF) $(JIT_TARGET_DEF) $(BCONFIG_H) $(SYSTEM_H) errors.h
build/genmddump.o : genmddump.cc $(RTL_BASE_H) $(BCONFIG_H) $(SYSTEM_H) \
$(CORETYPES_H) $(GTM_H) errors.h $(READ_MD_H) $(GENSUPPORT_H)
build/genmatch.o : genmatch.cc $(BCONFIG_H) $(SYSTEM_H) \
Expand Down
Loading
Loading