- 17 Oct, 2011 5 commits
-
-
dodji authored
This patch basically arranges for the allocation size of line_map buffers to be as close as possible to a power of two. This *significantly* decreases peak memory consumption as (macro) maps are numerous and stay live during all the compilation. The patch adds a new ggc_round_alloc_size interface to the ggc allocator. In each of the two main allocator implementations ('page' and 'zone') the function has been extracted from the main allocation function code and returns the actual size of the allocated memory region, thus giving a chance to the caller to maximize the amount of memory it actually uses from the allocated memory region. In the 'none' allocator implementation (that uses xmalloc) the ggc_round_alloc_size just returns the requested allocation size. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180086 138bc75d-0d04-0410-961f-82ee72b054a4
-
dodji authored
This patch adds statistics about line maps' memory consumption and macro expansion to the output of -fmem-report. It has been useful in trying to reduce the memory consumption of the macro maps support. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180085 138bc75d-0d04-0410-961f-82ee72b054a4
-
dodji authored
This patch adds -fdebug-cpp option. When used with -E this dumps the relevant macro map before every single token. This clutters the output a lot but has proved to be invaluable in tracking some bugs during the development of the virtual location support. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180084 138bc75d-0d04-0410-961f-82ee72b054a4
-
dodji authored
This second instalment uses the infrastructure of the previous patch to allocate a macro map for each macro expansion and assign a virtual location to each token resulting from the expansion. To date when cpp_get_token comes across a token that happens to be a macro, the macro expander kicks in, expands the macro, pushes the resulting tokens onto a "token context" and returns a dummy padding token. The next call to cpp_get_token goes look into the token context for the next token [which is going to result from the previous macro expansion] and returns it. If the token is a macro, the macro expander kicks in and you know the story. This patch piggy-backs on that macro expansion process, so to speak. First it modifies the macro expander to make it create a macro map for each macro expansion. It then allocates a virtual location for each resulting token. Virtual locations of tokens resulting from macro expansions are then stored on a special kind of context called an...
-
dodji authored
This is the first instalment of a set which goal is to track locations of tokens across macro expansions. Tom Tromey did the original work and attached the patch to PR preprocessor/7263. This opus is a derivative of that original work. This patch modifies the linemap module of libcpp to add virtual locations support. A virtual location is a mapped location that can resolve to several different physical locations. It can always resolve to the spelling location of a token. For tokens resulting from macro expansion it can resolve to: - either the location of the expansion point of the macro. - or the location of the token in the definition of the macro - or, if the token is an argument of a function-like macro, the location of the use of the matching macro parameter in the definition of the macro The patch creates a new type of line map called a macro map. For every single macro expansion, there is a macro map that generates a virtual location for every single resulting token of the expansion. The good old type of line map we all know is now called an ordinary map. That one still encodes spelling locations as it has always had. As a result linemap_lookup as been extended to return a macro map when given a virtual location resulting from a macro expansion. The layout of structs line_map has changed to support this new type of map. So did the layout of struct line_maps. Accessor macros have been introduced to avoid messing with the implementation details of these datastructures directly. This helped already as we have been testing different ways of arranging these datastructure. Having to constantly adjust client code that is too tied with the internals of line_map and line_maps would have been even more painful. Of course, many new public functions have been added to the linemap module to handle the resolution of virtual locations. This patch introduces the infrastructure but no part of the compiler uses virtual locations yet. However the client code of the linemap data structures has been adjusted as per the changes. E.g, it's not anymore reliable for a client code to manipulate struct line_map directly if it just wants to deal with spelling locations, because struct line_map can now represent a macro map as well. In that case, it's better to use the convenient API to resolve the initial (possibly virtual) location to a spelling location (or to an ordinary map) and use that. This is the reason why the patch adjusts the Java, Ada and Fortran front ends. Also, note that virtual locations are not supposed to be ordered for relations '<' and '>' anymore. To test if a virtual location appears "before" another one, one has to use a new operator exposed by the line map interface. The patch updates the only spot (in the diagnostics module) I have found that was making the assumption that locations were ordered for these relations. This is the only change that introduces a use of the new line map API in this patch, so I am adding a regression test for it only. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180081 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 28 Aug, 2011 1 commit
-
-
dodji authored
libcpp/ * line-map.c (linemap_add): Assert that reason must not be LC_RENAME when called for the first time on a "main input file". c-family/ * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as it's the first time it's being called on this main TU. gcc/lto/ * lto-lang.c (lto_init): Likewise. Also, avoid calling linemap_add twice. gcc/fortran/ * scanner.c (load_file): Don't abuse LC_RENAME reason while (indirectly) calling linemap_add. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@178146 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 22 Aug, 2011 1 commit
-
-
gchare authored
Use it to force BUILTINS_LOCATION when declaring builtins instead of creating a <built-in> entry in the line_table which is wrong. * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens defined in cpp_init_builtins and c_cpp_builtins. gcc/fortran/ChangeLog * cpp.c (gfc_cpp_init): Force BUILTINS_LOCATION for tokens defined in cpp_define_builtins. libcpp/ChangeLog * init.c (cpp_create_reader): Inititalize forced_token_location_p. * internal.h (struct cpp_reader): Add field forced_token_location_p. * lex.c (_cpp_lex_direct): Use forced_token_location_p. (cpp_force_token_locations): New. (cpp_stop_forcing_token_locations): New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177973 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 18 Aug, 2011 3 commits
-
-
ro authored
PR libstdc++/1773 * init.c (cpp_init_builtins): Define __cplusplus 19971L. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177877 138bc75d-0d04-0410-961f-82ee72b054a4
-
jsm28 authored
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177869 138bc75d-0d04-0410-961f-82ee72b054a4
-
jsm28 authored
* gcc.dg/c1x-uni-string-1.c, gcc.dg/c1x-uni-string-2.c: New tests. libcpp: * include/cpplib.h (struct cpp_options): Add rliterals. * init.c (struct lang_flags, lang_defaults): Add rliterals. (cpp_set_lang): Set rliterals option. (cpp_init_builtins): Define __STDC_UTF_16__ and __STDC_UTF_32__. * lex.c (_cpp_lex_direct): Only accept raw strings if rliterals. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177868 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 15 Aug, 2011 1 commit
-
-
gchare authored
linemap_position_for_column, removed it and updated users to use linemap_position_for_column instead libcpp/ChangeLog * include/line-map.h (LINEMAP_POSITION_FOR_COLUMN): Remove. Update all users to use linemap_position_for_column instead. gcc/go/ChangeLog * gofrontend/lex.cc (Lex::location): Update to use linemap_position_for_column instead. (Lex::earlier_location): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177768 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 28 Jul, 2011 2 commits
-
-
gchare authored
Remove unused field last_listed. Update all users. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@176898 138bc75d-0d04-0410-961f-82ee72b054a4
-
hjl authored
gcc/ 2011-07-28 H.J. Lu <hongjiu.lu@intel.com> * config.gcc: Set need_64bit_hwint to yes for x86 targets. libcpp/ 2011-07-28 H.J. Lu <hongjiu.lu@intel.com> * configure.ac: Set need_64bit_hwint to yes for x86 targets. * configure: Regenerated. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@176871 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 25 Jul, 2011 1 commit
-
-
ro authored
-This line, and those below, will be ignored-- M ChangeLog M system.h git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@176748 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 22 Jul, 2011 1 commit
-
-
ro authored
Ralf Wildenhues <Ralf.Wildenhues@gmx.de> gcc: PR bootstrap/49794 * configure.ac: Test AM_ICONV with CXX. * configure: Regenerate. * config/sol2-c.c (solaris_format_types): Use EXPORTED_CONST. gcc/ada: PR bootstrap/49794 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler): Assign to act.sa_sigaction. * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast current->return_address to char * before arithmetic. libcpp: PR bootstrap/49794 * configure.ac: Test AM_ICONV with CXX. * configure: Regenerate. * system.h (HAVE_DESIGNATED_INITIALIZERS): Never define for C++. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@176620 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 15 Jul, 2011 1 commit
-
-
dodji authored
libcpp/ * directives.c (struct if_stack): Use source_location as type here. * include/cpplib.h (struct cpp_callbacks)<include, define, undef, indent, def_pragma, used_define, used_undef>: Properly use source_location as parameter type, rather than unsigned int. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@176333 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 08 Jul, 2011 1 commit
-
-
jsm28 authored
ja.po, nl.po, ru.po, sv.po, tr.po, uk,po, vi.po, zh_CN.po, zh_TW.po: Update. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@176061 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 07 Jul, 2011 1 commit
-
-
ro authored
PR target/39150 * configure.ac (gcc_cv_as_hidden): Also accept x86_64-*-solaris2.1[0-9]*. (gcc_cv_as_cfi_directive): Likewise. (gcc_cv_as_comdat_group_group): Likewise. (set_have_as_tls): Likewise. * configure: Regenerate. * config.gcc (i[34567]86-*-solaris2*): Also handle x86_64-*-solaris2.1[0-9]*. * config.host (i[34567]86-*-solaris2*): Likewise. * config/sparc/sol2.h (ASM_CPU_DEFAULT_SPEC): Remove. * config/sol2-bi.h (ASM_CPU_DEFAULT_SPEC): Redefine. [USE_GLD] (ARCH_DEFAULT_EMULATION): Define. (TARGET_LD_EMULATION): Use it. * config/i386/sol2.h (ASM_CPU_DEFAULT_SPEC): Define. (SUBTARGET_CPU_EXTRA_SPECS): Add asm_cpu_default. * config/i386/sol2-bi.h (ASM_CPU32_DEFAULT_SPEC): Define. (ASM_CPU64_DEFAULT_SPEC): Define. (ASM_CPU_SPEC): Use %(asm_cpu_default). (ASM_SPEC): Redefine. (DEFAULT_ARCH32_P): Define using TARGET_64BIT_DEFAULT. * config/host-solaris.c [__x86_64__] (TRY_EMPTY_VM_SPACE): Reduce. * doc/install.texi (Specific, amd64-*-solaris2.1[0-9]*): Document. (Specific, ...
-
- 21 Jun, 2011 1 commit
-
-
jsm28 authored
* gcc.pot: Regenerate. libcpp/po: * cpplib.pot: Regenerate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@175251 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 16 Jun, 2011 1 commit
-
-
jason authored
* lex.c (lex_raw_string): Don't check for embedded NUL. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@175121 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 06 Jun, 2011 1 commit
-
-
dodji authored
libcpp/ * directives.c (do_pragma): Don't forget the invocation location when parsing the pragma name of a namespaced pragma directive. gcc/testsuite/ * gcc.dg/cpp/pragma-3.c: New test case. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@174694 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 02 Jun, 2011 1 commit
-
-
tromey authored
* files.c (read_file_guts): Add test on non-zero value of S_ISREG. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@174571 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 22 May, 2011 2 commits
-
-
uros authored
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@174037 138bc75d-0d04-0410-961f-82ee72b054a4
-
uros authored
* config/i386/cpuid.h (bit_MMXEXT): New define. libcpp/ChangeLog: 2011-05-22 Uros Bizjak <ubizjak@gmail.com> PR target/49104 * lex.c (init_vectorized_lexer): Do not set "minimum" when __3dNOW_A__ is defined. Check bit_MMXEXT and bit_CMOV to use search_line_mmx. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@174032 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 12 May, 2011 1 commit
-
-
jsm28 authored
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173697 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 25 Apr, 2011 1 commit
-
-
jkratoch authored
* ansidecl.h (ENUM_BITFIELD): New, from gcc/system.h. contrib/ * paranoia.cc (ENUM_BITFIELD): Remove. gcc/ * system.h (ENUM_BITFIELD): Remove. libcpp/ * system.h (ENUM_BITFIELD): Remove. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@172933 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 23 Apr, 2011 1 commit
-
-
jakub authored
* lex.c (lex_raw_string): When raw string ends with ??) followed by raw prefix and ", ensure it is preprocessed with ??) rather than ??]. * c-c++-common/raw-string-11.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@172903 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 20 Apr, 2011 1 commit
-
-
meyering authored
Change "if (E) free (E);" to "free (E);" everywhere except in the libgo/, intl/, zlib/ and classpath/ directories. Also transform equivalent variants like "if (E != NULL) free (E);" and allow an extra cast on the argument to free. Otherwise, the tested and freed "E" expressions must be identical, modulo white space. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@172785 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 03 Apr, 2011 1 commit
-
-
jsm28 authored
ja.po, nl.po, ru.po, sv.po, tr.po, uk,po, vi.po, zh_CN.po, zh_TW.po: Update. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@171909 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 25 Mar, 2011 1 commit
-
-
ktietz authored
* files.c (file_hash_eq): Use filename_cmp instead of strcmp. (nonexistent_file_hash_eq): Likewise. (remap_filename): Likewise. Handle absolute DOS-path, (append_file_to_dir): Check for IS_DIR_SEPARATOR instead of slash. (read_name_map): Likewise. * linemap.c (linemap_add): Use filename_cmp instead of strcmp. * mkdeps.c (apply_vpath): Use filename_ncmp instead of strncmp. (deps_restore): Use filename_cmp instead of strcmp. * init.c (read_original_directory): Use IS_DIR_SEPARATOR instead of checking for slash. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@171521 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 24 Mar, 2011 1 commit
-
-
jsm28 authored
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@171406 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 21 Mar, 2011 1 commit
-
-
meissner authored
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@171247 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 18 Mar, 2011 1 commit
-
-
rth authored
* lex.c [ALTIVEC] (search_line_fast): Require gcc version 4.5. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@171165 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 05 Mar, 2011 1 commit
-
-
jsm28 authored
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@170702 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 07 Jan, 2011 1 commit
-
-
jsm28 authored
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@168573 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 04 Jan, 2011 1 commit
-
-
ebotcazou authored
* directives.c (end_directive): Call _cpp_remove_overlay for deferred pragmas as well in traditional mode. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@168490 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 03 Jan, 2011 1 commit
-
-
jakub authored
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@168438 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 19 Dec, 2010 2 commits
-
-
jsm28 authored
ja.po, nl.po, sv.po, tr.po, uk,po, vi.po, zh_CN.po, zh_TW.po: Update. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@168073 138bc75d-0d04-0410-961f-82ee72b054a4
-
jsm28 authored
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@168054 138bc75d-0d04-0410-961f-82ee72b054a4
-
- 18 Dec, 2010 1 commit
-
-
jsm28 authored
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@168025 138bc75d-0d04-0410-961f-82ee72b054a4
-