forked from llvm-mirror/clang
-
Notifications
You must be signed in to change notification settings - Fork 5
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
UPC runtime: process config.h.cmake for each libupc runtime variant #1
Comments
This was referenced Feb 20, 2013
ghost
assigned swatanabe
Feb 20, 2013
vitillo
pushed a commit
to vitillo/clang-upc
that referenced
this issue
Sep 14, 2013
1. Use a hanging ident for function calls nested in binary expressions. E.g.: int aaaaa = aaaaaaaaa && aaaaaaaaaa( aaaaaaaaaa); 2. Slightly improve heuristic for builder type expressions and reduce penalty for breaking before "." and "->" in those. 3. Remove mostly obsolete metric of decreasing indent level. This fixes: llvm.org/PR14931. Changes clangupc#1 and clangupc#2 were necessary to keep tests passing after clangupc#3. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173680 91177308-0d34-0410-b5e6-96231b3b80d8
vitillo
pushed a commit
to vitillo/clang-upc
that referenced
this issue
Sep 14, 2013
Sample output: #0 void construct(pointer __p, llvm::ImutAVLTree<llvm::ImutContainerInfo<clang::ento::BugType *> > *const &__val) clangupc#1 void push_back(const value_type &__x) clangupc#2 void destroy() clangupc#3 void release() clangupc#4 void ~ImmutableSet() git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178400 91177308-0d34-0410-b5e6-96231b3b80d8
vitillo
pushed a commit
to vitillo/clang-upc
that referenced
this issue
Sep 14, 2013
Function declarations are now broken with the following preferences: 1) break amongst arguments. 2) break after return type. 3) break after (. 4) break before after nested name specifiers. Options clangupc#2 or clangupc#3 are preferred over clangupc#1 only if a substantial number of lines can be saved by that. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179287 91177308-0d34-0410-b5e6-96231b3b80d8
vitillo
pushed a commit
to vitillo/clang-upc
that referenced
this issue
Sep 14, 2013
a lambda. Bug clangupc#1 is that CGF's CurFuncDecl was "stuck" at lambda invocation functions. Fix that by generally improving getNonClosureContext to look through lambdas and captured statements but only report code contexts, which is generally what's wanted. Audit uses of CurFuncDecl and getNonClosureAncestor for correctness. Bug clangupc#2 is that lambdas weren't specially mapping 'self' when inside an ObjC method. Fix that by removing the requirement for that and using the normal EmitDeclRefLValue path in LoadObjCSelf. rdar://13800041 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181000 91177308-0d34-0410-b5e6-96231b3b80d8
vitillo
pushed a commit
to vitillo/clang-upc
that referenced
this issue
Sep 26, 2013
…86_64-unknown-unknown. It would emit @llvm.memcpy with "-triple x86_64-(mingw32|win32)" and had been failing since Nick's r185735. ; Function Attrs: nounwind declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture readonly, i64, i32, i1) clangupc#1 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185796 91177308-0d34-0410-b5e6-96231b3b80d8
vitillo
pushed a commit
to vitillo/clang-upc
that referenced
this issue
Sep 26, 2013
Sample output: 0. Program arguments: ... 1. <eof> parser at end of file 2. While analyzing stack: #0 void inlined() clangupc#1 void test() 3. crash-trace.c:6:3: Error evaluating statement git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186639 91177308-0d34-0410-b5e6-96231b3b80d8
swatanabe
pushed a commit
that referenced
this issue
Jan 30, 2015
Due to what can only be described as a CRT bug, stdout and amazingly even stderr are not always flushed upon process termination, especially when the system is under high threading pressure. I have found two repros for this: 1) In lib\Support\Threading.cpp, change sys::Mutex to an std::recursive_mutex and run check-clang. Usually between 30 and 40 tests will fail. 2) Add OutputDebugStrings in code that runs during static initialization and static shutdown. This will sometimes generate similar failures. After a substantial amount of troubleshooting and debugging, I found that I could reproduce this from the command line without running check-clang. Simply make the mutex change described in #1, then manually run the following command many times by running it once, then pressing Up -> Enter very quickly: D:\src\llvm\build\vs2013\Debug\bin\c-index-test.EXE -cursor-at=D:\src\llvm\tools\clang\test\Index\targeted-preamble.h:2:15 D:\src\llvm\tools\clang\test\Index\targeted-cursor.c -include D:\src\llvm\build\vs2013\tools\clang\test\Index\Output\targeted-cursor.c.tmp.h -Xclang -error-on-deserialized-decl=NestedVar1 -Xclang -error-on-deserialized-decl=TopVar | D:\src\llvm\build\vs2013\Debug\bin\FileCheck.EXE D:\src\llvm\tools\clang\test\Index\targeted-cursor.c -check-prefix=PREAMBLE-CURSOR1 Sporadically they will fail, and attaching a debugger to a failed instance indicates that stdin of FileCheck.exe is empty. Note that due to the repro in #2, we can rule out a bug in the STL's mutex implementation, and instead conclude that this is a real flake in the windows test harness. Test Plan: Without patch: Ran check-clang 10 times and saw over 30 Unexpected failures on every run. With patch: Ran check-clang 10 times and saw 0 unexpected failures across all runs. Reviewers: rnk Differential Revision: http://reviews.llvm.org/D4021 Patch by Zachary Turner! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210225 91177308-0d34-0410-b5e6-96231b3b80d8
swatanabe
pushed a commit
that referenced
this issue
Mar 11, 2017
Summary: The switch statement could be added to the hasCondition matcher. Example: ``` clang-query> match switchStmt(hasCondition(ignoringImpCasts(declRefExpr()))) ``` Output: ``` Match #1: Binding for "root": SwitchStmt 0x2f9b528 </usr/local/google/home/etienneb/examples/enum.cc:35:3, line:38:3> |-<<<NULL>>> |-ImplicitCastExpr 0x2f9b510 <line:35:11> 'int' <IntegralCast> | `-ImplicitCastExpr 0x2f9b4f8 <col:11> 'enum Color' <LValueToRValue> | `-DeclRefExpr 0x2f9b4d0 <col:11> 'enum Color' lvalue Var 0x2f9a118 'C' 'enum Color' `-CompoundStmt 0x2f9b610 <col:14, line:38:3> |-CaseStmt 0x2f9b578 <line:36:3, col:22> | |-ImplicitCastExpr 0x2f9b638 <col:8> 'int' <IntegralCast> | | `-DeclRefExpr 0x2f9b550 <col:8> 'enum Size' EnumConstant 0x2f99e40 'Small' 'enum Size' | |-<<<NULL>>> | `-ReturnStmt 0x2f9b5d0 <col:15, col:22> | `-IntegerLiteral 0x2f9b5b0 <col:22> 'int' 1 `-DefaultStmt 0x2f9b5f0 <line:37:3, col:12> `-BreakStmt 0x2f9b5e8 <col:12> 1 match. ``` Reviewers: aaron.ballman, sbenza, klimek Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D20767 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271208 91177308-0d34-0410-b5e6-96231b3b80d8
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am in the process of upgrading the UPC runtime to the latest version in GUPC. That version has support for inter-node communications via a networking API called "portals4". It is enabled via a configure option. The choices are: (1) the current 'smp' runtime, or (2) the 'portals4' runtime. At some point in the future, we might try to unify these runtimes. Another improvement is re-licensing from FSF-assigned GPL licensing to BSD-licensing.
As a first cut, I copied over the new files, tweaked CMakelists.txt by adding the new 'smp' files to LIBUPC_SOURCES. I also copied the new 'config.h.in' onto 'config.h.make'. This, however, led to some build issues. The important diff's follow.
46a64,69
After reading through the cmake logic, it seems that the version of config.h that is created from 'config.h.cmake' is built at the top-level of the libupc build structure, but is not built for each {packed,struct}-pts,{first,last}-vaddr variant. The variants pick up their values of 'GUPCR_PTS_PACKED_REP', etc. from the 'COMPILER_DEFINITIONS' property:
set_property(TARGET ${lib_name} PROPERTY COMPILE_DEFINITIONS ${lib_defs})
Then, for the runtime sources written 'upc', there is this logic in 'smp/upc-lib.in':
ifdef UPC_PTS_PACKED_REP
define GUPCR_PTS_PACKED_REP 1
elif defined(UPC_PTS_STRUCT_REP)
define GUPCR_PTS_STRUCT_REP 1
endif
The logic above is a divergence from the logic in the GUPC runtime, because there 'config.h.in' is customized by configure for each runtime variant.
Is the above summary correct?
In the short term, I can remove the explicit #undef of the various shared pointer format related definitions and let the existing cmake logic take care of it, but I am wondering if the logic might be reworked to be more similar to the method used by GUPC?
In a related matter, as shown in the diff's above, there is the cmake substitution that I need to bring back:
define GUPCR_TREE_FANOUT @UPC_TREE_FANOUT@
In general, however, there appear to be many few configuration-related definitions that are either tested by 'cmake' or that might be provided as cmake parameters. (I don't know the syntax for setting those parameters, however.) In particular, the portals4 runtime introduces some new configuration parameters. For example,
40a25,36
Summarizing:
When using cmake, is it sometimes possible to actually run configure as a way of making configuration tests? Or does cmake have another way of implementing configure-like checks?
Add
Subtasks
Add
Related issues
Issue #
Delay: days Cancel
History
#1
Updated by John Wiegley 3 months ago
#2
Updated by Gary Funck 3 months ago
Comment
I recently merged the current GUPC libgupc runtime into the Clang UPC runtime. Most of the problems encountered relate to the fact that config.h is not fully processed via configure and is not instantiated for each runtime variant.
This web page summarizes the key differences:
[[http://gccupc.org/clang-upc-runtime-mods/]]
While going through the process of updating the runtime, I discovered a couple other differences that I will summarize here, but that might be logically separated out into other issues.
Thus in addition to fully processing config.h.in and customizing it to each runtime variant, it appears that gcc-upc.h should be unconditionally pre-included (as this is the way that gupc works). This in turn will include gcc-upc-lib.h.
A note regarding the rename of gcc-upc-lib.in to upc-lib.in: Although there is some logic in doing that, it does make the task of tracking changes between gupc and clang upc more difficult.
#3
Updated by Steven Watanabe 3 months ago
Comment
I'm not sure that moving the #defines back into config.h will help.
The real problem is that you're trying to use the same file for
config.h.in and config.h.cmake. Unfortunately, CMake uses a different
syntax than autoconf, so this isn't really going to work.
CMake has its own method of running configuration tests. I just didn't implement it, because it worked without on the platforms we tested with. I don't know of a way for CMake to use the autotools script (It may be possible, but I doubt that there's an easy way--running configure and parsing the output doesn't seem like a very good idea.).
UPC runtime (libupc) build failure with newer cmake (2.8.10.2) #4
Updated by Gary Funck 3 months ago
OSX: make fails with unrecognized command line option "-Wcovered-switch-default" #5
Updated by Steven Watanabe 3 months ago
#6
Updated by Steven Watanabe 2 months ago
Comment
The following macros in config.h are apparently unused. I'm assuming that it's okay just to remove them.
HAVE_AS_SYMVER_DIRECTIVE
HAVE_ATTRIBUTE_ALIAS
HAVE_ATTRIBUTE_DLLEXPORT
HAVE_ATTRIBUTE_VISIBILITY
HAVE_BACKTRACE
HAVE_BACKTRACE SYMBOLS
HAVE_BACKTRACE_SYMBOLS_FD
HAVE_BROKEN_POSIX_SEMAPHORES
HAVE_CC_TLS
HAVE_DECL_SYS_SIGLIST
HAVE_DLFCN_H
HAVE_FCNTL_H
HAVE_FORK
HAVE_FTRUNCATE
HAVE_GETCWD
HAVE_GETHOSTBYNAME
HAVE_GETLOADAVG
HAVE_GETPAGESIZE
HAVE_GTHR_DEFAULT
HAVE_INTTYPES_H
HAVE_MALLOC
HAVE_MEMORY_H
HAVE_MEMSET
HAVE_MKDIR
HAVE_MMAP
HAVE_MUNMAP
HAVE_NETDB_H
HAVE_NETINET_IN_H
HAVE_PTHREAD_AFFINITY_NP
HAVE_PTRDIFF_T
HAVE_SCHED_H
HAVE_SEMAPHORE_H
HAVE_SOCKET
HAVE_STAT_EMPTY_STRING_BUG
HAVE_STDDEF_H
HAVE_STDINT_H
HAVE_STDLIB_H
HAVE_STRCASECMP
HAVE_STRDUP
HAVE_STRERROR
HAVE_STRINGS_H
HAVE_STRING_H
HAVE_STRTOL
HAVE_STRTOULL
HAVE_SYNC_BUILTINS
HAVE_SYS_LOADAVG_H
HAVE_SYS_SOCKET_H
HAVE_SYS_STAT_H
HAVE_SYS_TYPES_H
HAVE_TYPE_WAIT_H
HAVE_TLS
HAVE_UNISTD_H
HAVE_VFORK
HAVE_VFORK_H
HAVE_WORKING_FORK
HAVE_WORKING_VFORK
LIBGUPC_GNU_SYMBOL_VERSIONING
LSTAT_FOLLOWS_SLASHED_SYMLINK
LT_OBJDIR
PACKAGE
PACKAGE_NAME
PACKAGE_STRING
PACKAGE_TARNAME
PACKAGE_URL
PACKAGE_VERSION
SIZEOF_CHAR
SIZEOF_INT
SIZEOF_LONG
SIZEOF_SHORT
SIZEOF_VOID_P
STDC_HEADERS
STRING_WITH_STRINGS
VERSION
#7
Updated by Gary Funck 2 months ago
Comment
Steven Watanabe wrote:
Yes. That's OK. We have a tendency to add (or inherit) autoconf tests that we don't use.
#8
Updated by Steven Watanabe 2 months ago
Comment
Where can I find portals4?
#9
Updated by Steven Watanabe 2 months ago
Comment
I'm not sure that specializing config.h for each build variant is feasible.
config.h is one of the sources for gcc-upc-lib.h, and I'd really rather avoid specializing gcc-upc-lib.h as this would mean extra logic to #include the correct file depending on the compiler options.
#10
Updated by Gary Funck 2 months ago
Comment
Steven Watanabe wrote:
I will send you a "how to" under separate cover.
#11
Updated by Gary Funck 2 months ago
Comment
Steven Watanabe wrote:
We may need to discuss this in a telecon, so that I can be sure that I understand the issues.
However we do it, the goal is for the libgupc runtime sources (the non-make/config related files) to match those in the clang libupc directory. I don't think that Intrepid wants to use the approach used in the clang runtime, but perhaps there is a middle ground some where.
The text was updated successfully, but these errors were encountered: